diff options
Diffstat (limited to 'modules/raycast/static_raycaster.cpp')
-rw-r--r-- | modules/raycast/static_raycaster.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/raycast/static_raycaster.cpp b/modules/raycast/static_raycaster.cpp index f2e944a82d..5d2dedf1a4 100644 --- a/modules/raycast/static_raycaster.cpp +++ b/modules/raycast/static_raycaster.cpp @@ -95,16 +95,16 @@ void StaticRaycasterEmbree::commit() { } void StaticRaycasterEmbree::set_mesh_filter(const RBSet<int> &p_mesh_ids) { - for (RBSet<int>::Element *E = p_mesh_ids.front(); E; E = E->next()) { - rtcDisableGeometry(rtcGetGeometry(embree_scene, E->get())); + for (const int &E : p_mesh_ids) { + rtcDisableGeometry(rtcGetGeometry(embree_scene, E)); } rtcCommitScene(embree_scene); filter_meshes = p_mesh_ids; } void StaticRaycasterEmbree::clear_mesh_filter() { - for (RBSet<int>::Element *E = filter_meshes.front(); E; E = E->next()) { - rtcEnableGeometry(rtcGetGeometry(embree_scene, E->get())); + for (const int &E : filter_meshes) { + rtcEnableGeometry(rtcGetGeometry(embree_scene, E)); } rtcCommitScene(embree_scene); filter_meshes.clear(); |