mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Remove unnecessary copy of a big data structure
This commit is contained in:
parent
58eccc7a2a
commit
15b569fb71
@ -73,7 +73,7 @@ struct MapEditEvent
|
|||||||
modified_blocks.push_back(getNodeBlockPos(pos));
|
modified_blocks.push_back(getNodeBlockPos(pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
void setModifiedBlocks(const std::map<v3s16, MapBlock *> blocks)
|
void setModifiedBlocks(const std::map<v3s16, MapBlock *>& blocks)
|
||||||
{
|
{
|
||||||
assert(modified_blocks.empty()); // only meant for initialization (once)
|
assert(modified_blocks.empty()); // only meant for initialization (once)
|
||||||
modified_blocks.reserve(blocks.size());
|
modified_blocks.reserve(blocks.size());
|
||||||
|
Loading…
Reference in New Issue
Block a user