TODO, I'm not sure what to do about this

master
Marc Gilleron 2022-07-03 03:25:57 +01:00
parent 0bf9a9f87f
commit 7634df561e
1 changed files with 3 additions and 0 deletions

View File

@ -69,6 +69,9 @@ VoxelDataBlock *VoxelDataMap::create_default_block(Vector3i bpos) {
ZN_ASSERT_RETURN_V(!has_block(bpos), nullptr);
#endif
VoxelDataBlock &map_block = _blocks_map[bpos];
// TODO Clang complains the `move` prevents copy elision.
// But I dont want `VoxelDataBlock` to have copy... so what, should I add [expensive] copy construction just so
// clang is able to elide it?
map_block = std::move(VoxelDataBlock(buffer, _lod_index));
return &map_block;
}