diff --git a/src/database-dummy.cpp b/src/database-dummy.cpp index 7a36a894..9ca0e732 100644 --- a/src/database-dummy.cpp +++ b/src/database-dummy.cpp @@ -139,7 +139,7 @@ MapBlock* Database_Dummy::loadBlock(v3s16 blockpos) return(NULL); } -void Database_Dummy::listAllLoadableBlocks(core::list &dst) +void Database_Dummy::listAllLoadableBlocks(std::list &dst) { for(std::map::iterator x = m_database.begin(); x != m_database.end(); ++x) { diff --git a/src/database-dummy.h b/src/database-dummy.h index 55b21532..5a692137 100644 --- a/src/database-dummy.h +++ b/src/database-dummy.h @@ -16,7 +16,7 @@ public: virtual void endSave(); virtual void saveBlock(MapBlock *block); virtual MapBlock* loadBlock(v3s16 blockpos); - virtual void listAllLoadableBlocks(core::list &dst); + virtual void listAllLoadableBlocks(std::list &dst); virtual int Initialized(void); ~Database_Dummy(); private: diff --git a/src/database-leveldb.cpp b/src/database-leveldb.cpp index e0ab4f09..cb0101a8 100644 --- a/src/database-leveldb.cpp +++ b/src/database-leveldb.cpp @@ -146,7 +146,7 @@ MapBlock* Database_LevelDB::loadBlock(v3s16 blockpos) return(NULL); } -void Database_LevelDB::listAllLoadableBlocks(core::list &dst) +void Database_LevelDB::listAllLoadableBlocks(std::list &dst) { leveldb::Iterator* it = m_database->NewIterator(leveldb::ReadOptions()); for (it->SeekToFirst(); it->Valid(); it->Next()) { diff --git a/src/database-leveldb.h b/src/database-leveldb.h index 40bd01f2..94299211 100644 --- a/src/database-leveldb.h +++ b/src/database-leveldb.h @@ -21,7 +21,7 @@ public: virtual void endSave(); virtual void saveBlock(MapBlock *block); virtual MapBlock* loadBlock(v3s16 blockpos); - virtual void listAllLoadableBlocks(core::list &dst); + virtual void listAllLoadableBlocks(std::list &dst); virtual int Initialized(void); ~Database_LevelDB(); private: diff --git a/src/database-sqlite3.cpp b/src/database-sqlite3.cpp index 69795a1f..1ae4d7a4 100644 --- a/src/database-sqlite3.cpp +++ b/src/database-sqlite3.cpp @@ -294,7 +294,7 @@ void Database_SQLite3::createDatabase() } -void Database_SQLite3::listAllLoadableBlocks(core::list &dst) +void Database_SQLite3::listAllLoadableBlocks(std::list &dst) { verifyDatabase(); diff --git a/src/database-sqlite3.h b/src/database-sqlite3.h index 83b0d2a5..80ba028a 100644 --- a/src/database-sqlite3.h +++ b/src/database-sqlite3.h @@ -22,7 +22,7 @@ public: virtual void saveBlock(MapBlock *block); virtual MapBlock* loadBlock(v3s16 blockpos); - virtual void listAllLoadableBlocks(core::list &dst); + virtual void listAllLoadableBlocks(std::list &dst); virtual int Initialized(void); ~Database_SQLite3(); private: diff --git a/src/database.h b/src/database.h index b6d8950b..337f2745 100644 --- a/src/database.h +++ b/src/database.h @@ -8,7 +8,7 @@ #include "main.h" #include "filesys.h" #include "serialization.h" -#include +#include class Database; class ServerMap; @@ -23,7 +23,7 @@ public: virtual MapBlock* loadBlock(v3s16 blockpos)=0; long long getBlockAsInteger(const v3s16 pos); v3s16 getIntegerAsBlock(long long i); - virtual void listAllLoadableBlocks(core::list &dst)=0; + virtual void listAllLoadableBlocks(std::list &dst)=0; virtual int Initialized(void)=0; virtual ~Database() {}; }; diff --git a/src/map.cpp b/src/map.cpp index 7a5296ba..e2191f9e 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -3371,10 +3371,7 @@ void ServerMap::listAllLoadableBlocks(std::list &dst) errorstream<<"Map::listAllLoadableBlocks(): Result will be missing " <<"all blocks that are stored in flat files"< dst_; - dbase->listAllLoadableBlocks(dst_); - for(core::list::Iterator i = dst_.begin(); i != dst_.end(); ++i) - dst.push_back(*i); + dbase->listAllLoadableBlocks(dst); } void ServerMap::listAllLoadedBlocks(std::list &dst)