1
0
mirror of https://github.com/minetest/minetest.git synced 2025-06-30 23:20:22 +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:
Loic Blot
2016-05-14 12:23:15 +02:00
parent decbd396df
commit 143401451c
11 changed files with 47 additions and 47 deletions

View File

@ -28,10 +28,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class Database_Dummy : public Database
{
public:
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);
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);
private:
std::map<s64, std::string> m_database;