mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 01:25:20 +02:00
DB::loadBlock copy removal & DB backend cleanup
* Remove the copy from db::loadBlock by using a pointer to the destination * cleanup db backend, the child backend doesn't have to set their functions as virtual
This commit is contained in:
@@ -31,17 +31,17 @@ class Database_SQLite3 : public Database
|
||||
{
|
||||
public:
|
||||
Database_SQLite3(const std::string &savedir);
|
||||
|
||||
virtual void beginSave();
|
||||
virtual void endSave();
|
||||
|
||||
virtual bool saveBlock(const v3s16 &pos, const std::string &data);
|
||||
virtual std::string loadBlock(const v3s16 &pos);
|
||||
virtual bool deleteBlock(const v3s16 &pos);
|
||||
virtual void listAllLoadableBlocks(std::vector<v3s16> &dst);
|
||||
virtual bool initialized() const { return m_initialized; }
|
||||
~Database_SQLite3();
|
||||
|
||||
void beginSave();
|
||||
void endSave();
|
||||
|
||||
bool saveBlock(const v3s16 &pos, const std::string &data);
|
||||
void loadBlock(const v3s16 &pos, std::string *block);
|
||||
bool deleteBlock(const v3s16 &pos);
|
||||
void listAllLoadableBlocks(std::vector<v3s16> &dst);
|
||||
bool initialized() const { return m_initialized; }
|
||||
|
||||
private:
|
||||
// Open the database
|
||||
void openDatabase();
|
||||
|
Reference in New Issue
Block a user