summaryrefslogtreecommitdiff
path: root/modules/raycast/static_raycaster.cpp
diff options
context:
space:
mode:
authorAaron Record <aaronjrecord@gmail.com>2022-05-18 17:43:40 -0600
committerAaron Record <aaronjrecord@gmail.com>2022-05-19 12:09:16 +0200
commit900c676b0282bed83d00834e3c280ac89c2bc94d (patch)
treeb6bf869a55440a666f4bcc17d5e9cd93ff26dbdc /modules/raycast/static_raycaster.cpp
parent71c40ff4da85a4770958533cdc65f2c9f7ddeaff (diff)
Use range iterators for RBSet in most cases
Diffstat (limited to 'modules/raycast/static_raycaster.cpp')
-rw-r--r--modules/raycast/static_raycaster.cpp8
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();