From 55533b35420a6756f99033442e045c71a06c6d91 Mon Sep 17 00:00:00 2001 From: Trey M Date: Fri, 13 May 2022 15:04:47 -0500 Subject: [PATCH] removed unused key and redundent lookup --- terrain/fixed_lod/voxel_terrain.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/terrain/fixed_lod/voxel_terrain.cpp b/terrain/fixed_lod/voxel_terrain.cpp index 6b838702..46ac82e3 100644 --- a/terrain/fixed_lod/voxel_terrain.cpp +++ b/terrain/fixed_lod/voxel_terrain.cpp @@ -376,10 +376,8 @@ void VoxelTerrain::set_block_enter_notification_enabled(bool enable) { _block_enter_notification_enabled = enable; if (enable == false) { - const Vector3i *key = nullptr; - for (auto elm = _loading_blocks.begin(); elm < _loading_blocks.end(); ++elm) { - LoadingBlock *lb = _loading_blocks.getptr(elm->key); + LoadingBlock *lb = &elm->value; CRASH_COND(lb == nullptr); lb->viewers_to_notify.clear(); }