1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Get rid of parent pointer in MapBlock

This commit is contained in:
sfan5 2023-12-12 15:43:39 +01:00
parent c6cf90f67b
commit f5b35a074f
6 changed files with 15 additions and 50 deletions

View file

@ -26,9 +26,8 @@ typedef std::vector<MapBlock*> MBContainer;
static void allocateSome(MBContainer &vec, u32 n)
{
vec.reserve(vec.size() + n);
Map *map = reinterpret_cast<Map*>(0x1234);
for (u32 i = 0; i < n; i++) {
auto *mb = new MapBlock(map, {i & 0xff, 0, i >> 8}, nullptr);
auto *mb = new MapBlock({i & 0xff, 0, i >> 8}, nullptr);
vec.push_back(mb);
}
}