mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-18 10:45:27 +02:00
MapBlock::getData be gone (#16292)
* Remove Mapblock::getData and all its uses * Do not leak ystride, zstride, and nodecount
This commit is contained in:
@@ -21,6 +21,7 @@ class NodeMetadataList;
|
||||
class IGameDef;
|
||||
class MapBlockMesh;
|
||||
class VoxelManipulator;
|
||||
class NameIdMapping;
|
||||
|
||||
#define BLOCK_TIMESTAMP_UNDEFINED 0xffffffff
|
||||
|
||||
@@ -80,11 +81,6 @@ public:
|
||||
raiseModified(MOD_STATE_WRITE_NEEDED, MOD_REASON_REALLOCATE);
|
||||
}
|
||||
|
||||
MapNode* getData()
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
////
|
||||
//// Modification tracking methods
|
||||
////
|
||||
@@ -427,18 +423,23 @@ public:
|
||||
// clearObject and return removed objects count
|
||||
u32 clearObjects();
|
||||
|
||||
private:
|
||||
static const u32 ystride = MAP_BLOCKSIZE;
|
||||
static const u32 zstride = MAP_BLOCKSIZE * MAP_BLOCKSIZE;
|
||||
|
||||
static const u32 nodecount = MAP_BLOCKSIZE * MAP_BLOCKSIZE * MAP_BLOCKSIZE;
|
||||
|
||||
private:
|
||||
/*
|
||||
Private methods
|
||||
*/
|
||||
|
||||
void deSerialize_pre22(std::istream &is, u8 version, bool disk);
|
||||
|
||||
static void getBlockNodeIdMapping(NameIdMapping *nimap, MapNode *nodes,
|
||||
const NodeDefManager *nodedef);
|
||||
static void correctBlockNodeIds(const NameIdMapping *nimap, MapNode *nodes,
|
||||
IGameDef *gamedef);
|
||||
|
||||
/*
|
||||
* PLEASE NOTE: When adding something here be mindful of position and size
|
||||
* of member variables! This is also the reason for the weird public-private
|
||||
|
Reference in New Issue
Block a user