Fix wrong condition

This commit is contained in:
Marc Gilleron 2022-08-30 19:35:25 +01:00
parent b21ca8e0f7
commit 40ee3697e1
2 changed files with 2 additions and 2 deletions

View File

@ -1467,7 +1467,7 @@ void VoxelTerrain::apply_data_block_response(VoxelEngine::BlockDataOutput &ob) {
}*/
// Create or update block data
const bool was_not_loaded = _data->has_block(block_pos, 0);
const bool was_not_loaded = !_data->has_block(block_pos, 0);
VoxelDataBlock *block = _data->try_set_block_buffer(
block_pos, 0, ob.voxels, ob.type == VoxelEngine::BlockDataOutput::TYPE_LOADED, true);
if (block == nullptr) {

View File

@ -10,7 +10,7 @@ namespace zylann {
class RefCount {
public:
RefCount() {}
RefCount(unsigned int initial_count): _count(initial_count) {}
RefCount(unsigned int initial_count) : _count(initial_count) {}
inline void add() {
++_count;