mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-16 01:45:36 +02:00
Replace std::list by std::vector into ServerMap::listAllLoadableBlocks ServerMap::listAllLoadedBlocks and their database backends.
This adds a speedup on database migration and /clearobjects command
This commit is contained in:
@@ -274,12 +274,11 @@ void Database_SQLite3::createDatabase()
|
||||
|
||||
}
|
||||
|
||||
void Database_SQLite3::listAllLoadableBlocks(std::list<v3s16> &dst)
|
||||
void Database_SQLite3::listAllLoadableBlocks(std::vector<v3s16> &dst)
|
||||
{
|
||||
verifyDatabase();
|
||||
|
||||
while(sqlite3_step(m_database_list) == SQLITE_ROW)
|
||||
{
|
||||
while(sqlite3_step(m_database_list) == SQLITE_ROW) {
|
||||
sqlite3_int64 block_i = sqlite3_column_int64(m_database_list, 0);
|
||||
v3s16 p = getIntegerAsBlock(block_i);
|
||||
//dstream<<"block_i="<<block_i<<" p="<<PP(p)<<std::endl;
|
||||
|
Reference in New Issue
Block a user