mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Database backends: fix bug, and small speedup
-> Redis backend: break from switch to fix bug -> Dummy and redis backends: reserve the count so that creating the list is faster
This commit is contained in:
@@ -47,6 +47,7 @@ bool Database_Dummy::deleteBlock(const v3s16 &pos)
|
||||
|
||||
void Database_Dummy::listAllLoadableBlocks(std::vector<v3s16> &dst)
|
||||
{
|
||||
dst.reserve(m_database.size());
|
||||
for (std::map<s64, std::string>::const_iterator x = m_database.begin();
|
||||
x != m_database.end(); ++x) {
|
||||
dst.push_back(getIntegerAsBlock(x->first));
|
||||
|
Reference in New Issue
Block a user