summaryrefslogtreecommitdiff
path: root/src/voxel.cpp
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2015-01-17 19:19:26 +1000
committerCraig Robbins <kde.psych@gmail.com>2015-01-18 13:39:50 +1000
commit805c8e51e5dd4dfad381a0d40b4388b5de90becf (patch)
treef84388699288e570b3244ce7534fbd7aed684081 /src/voxel.cpp
parent2f0a8f1c3e6429d0d579093c95b9bf27c32e6fd1 (diff)
downloadminetest-805c8e51e5dd4dfad381a0d40b4388b5de90becf.tar.gz
minetest-805c8e51e5dd4dfad381a0d40b4388b5de90becf.tar.bz2
minetest-805c8e51e5dd4dfad381a0d40b4388b5de90becf.zip
Create empty default constructor for MapNode
Diffstat (limited to 'src/voxel.cpp')
-rw-r--r--src/voxel.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/voxel.cpp b/src/voxel.cpp
index 02da42459..8ac786aab 100644
--- a/src/voxel.cpp
+++ b/src/voxel.cpp
@@ -173,10 +173,8 @@ void VoxelManipulator::addArea(const VoxelArea &area)
dstream<<", new_size="<<new_size;
dstream<<std::endl;*/
- // Allocate and clear new data
- // 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)];
+ // Allocate new data and clear flags
+ MapNode *new_data = new MapNode[new_size];
assert(new_data);
u8 *new_flags = new u8[new_size];
assert(new_flags);