summaryrefslogtreecommitdiff
path: root/src/voxel.cpp
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2014-12-22 01:37:45 +1000
committerCraig Robbins <kde.psych@gmail.com>2014-12-24 23:13:24 +1000
commit8621e6de5dc031b547739ab3ff8dc1575a284d1b (patch)
tree4a376e7da4bf85a76d0b579d8259b2752246c2ad /src/voxel.cpp
parent03beb597c2d102340e3251466922dccf0dd19dd8 (diff)
downloadminetest-8621e6de5dc031b547739ab3ff8dc1575a284d1b.tar.gz
minetest-8621e6de5dc031b547739ab3ff8dc1575a284d1b.tar.bz2
minetest-8621e6de5dc031b547739ab3ff8dc1575a284d1b.zip
Large increase in performance
Diffstat (limited to 'src/voxel.cpp')
-rw-r--r--src/voxel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/voxel.cpp b/src/voxel.cpp
index 335ab307c..bd14acb06 100644
--- a/src/voxel.cpp
+++ b/src/voxel.cpp
@@ -180,7 +180,9 @@ void VoxelManipulator::addArea(const VoxelArea &area)
dstream<<std::endl;*/
// Allocate and clear new data
- MapNode *new_data = new MapNode[new_size];
+ // FIXME: UGLY KLUDGE because MapNode default constructor is FUBAR; it
+ // initialises data that is going to be overwritten anyway
+ MapNode *new_data = (MapNode*)new char[new_size * sizeof (*new_data)];
assert(new_data);
u8 *new_flags = new u8[new_size];
assert(new_flags);