summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pathfinder.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pathfinder.cpp b/src/pathfinder.cpp
index babdcff4e..8f6033813 100644
--- a/src/pathfinder.cpp
+++ b/src/pathfinder.cpp
@@ -707,6 +707,7 @@ std::vector<v3s16> Pathfinder::getPath(ServerEnvironment *env,
//finalize path
std::vector<v3s16> full_path;
+ full_path.reserve(path.size());
for (const v3s16 &i : path) {
full_path.push_back(getIndexElement(i).pos);
}