mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Add a bit of debug code around MapBlock refcounting
This commit is contained in:
parent
39417cf7a7
commit
0c12c1f400
6 changed files with 74 additions and 31 deletions
|
@ -29,7 +29,9 @@ public:
|
|||
MapSector(Map *parent, v2s16 pos, IGameDef *gamedef);
|
||||
virtual ~MapSector();
|
||||
|
||||
void deleteBlocks();
|
||||
/// @brief Deletes all blocks (regardless of reference count).
|
||||
/// @param used_count output: number of blocks which were still ref'd
|
||||
void deleteBlocks(size_t *used_count = nullptr);
|
||||
|
||||
v2s16 getPos() const
|
||||
{
|
||||
|
@ -60,7 +62,8 @@ public:
|
|||
|
||||
bool empty() const { return m_blocks.empty(); }
|
||||
|
||||
int size() const { return m_blocks.size(); }
|
||||
size_t size() const { return m_blocks.size(); }
|
||||
|
||||
protected:
|
||||
|
||||
// The pile of MapBlocks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue