MCPcopy Create free account
hub / github.com/DFHack/dfhack / Allocate

Method Allocate

library/modules/MapCache.cpp:143–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143bool MapExtras::Block::Allocate()
144{
145 if (block)
146 return true;
147
148 block = Maps::ensureTileBlock(bcoord.x*16, bcoord.y*16, bcoord.z);
149 if (!block)
150 return false;
151
152 delete[] item_counts;
153 delete tiles;
154 delete basemats;
155 init();
156
157 return true;
158}
159
160MapExtras::Block::~Block()
161{

Callers 1

ensureBlockAtFunction · 0.45

Calls 2

ensureTileBlockFunction · 0.85
initFunction · 0.50

Tested by

no test coverage detected