1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Create empty default constructor for MapNode

This commit is contained in:
Craig Robbins 2015-01-17 19:19:26 +10:00
parent 2f0a8f1c3e
commit 805c8e51e5
5 changed files with 21 additions and 12 deletions

View file

@ -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);