Significantly optimize LevelDB database backend

This commit is contained in:
ShadowNinja
2014-03-28 16:47:19 -04:00
parent 6e565e93d1
commit 5905c34ec0
6 changed files with 61 additions and 49 deletions

5
db.h
View File

@ -7,14 +7,13 @@
#include <string>
#include <utility>
// we cannot use ... char>> here because mingw-gcc is f**king retarded (caring about whitespace and shit)
typedef std::pair<int64_t, std::basic_string<unsigned char> > DBBlock;
typedef std::list<DBBlock> DBBlockList;
class DB {
public:
virtual std::vector<int64_t> getBlockPos()=0;
virtual DBBlockList getBlocksOnZ(int zPos)=0;
virtual std::vector<int64_t> getBlockPos() = 0;
virtual DBBlockList getBlocksOnZ(int zPos) = 0;
};
#endif // _DB_H