From 25f3e09da9a5551ceefe88d768fc16e88ad50080 Mon Sep 17 00:00:00 2001 From: Dave Corley Date: Sat, 23 Dec 2023 13:29:06 -0600 Subject: [PATCH] Fix(CS): Correct build issues on some compilers --- apps/opencs/view/render/cell.cpp | 13 +++++++++---- apps/opencs/view/render/instancemode.hpp | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/opencs/view/render/cell.cpp b/apps/opencs/view/render/cell.cpp index a1f3c0c41f..b0c8425ad3 100644 --- a/apps/opencs/view/render/cell.cpp +++ b/apps/opencs/view/render/cell.cpp @@ -615,10 +615,15 @@ osg::ref_ptr CSVRender::Cell::getSnapTarget(unsigned int ele void CSVRender::Cell::selectFromGroup(const std::vector group) { for (const auto& [_, object] : mObjects) - if (auto found = std::ranges::find_if(group.begin(), group.end(), - [&object](const std::string& id) { return object->getReferenceId() == id; }); - found != group.end()) - object->setSelected(true, osg::Vec4f(1, 0, 1, 1)); + { + for (const auto& objectName : group) + { + if (objectName == object->getReferenceId()) + { + object->setSelected(true, osg::Vec4f(1, 0, 1, 1)); + } + } + } } void CSVRender::Cell::unhideAll() diff --git a/apps/opencs/view/render/instancemode.hpp b/apps/opencs/view/render/instancemode.hpp index 4e0172759a..9267823e22 100644 --- a/apps/opencs/view/render/instancemode.hpp +++ b/apps/opencs/view/render/instancemode.hpp @@ -14,8 +14,8 @@ #include "editmode.hpp" #include "instancedragmodes.hpp" +#include #include -#include class QDragEnterEvent; class QDropEvent;