diff --git a/apps/opencs/view/render/cell.cpp b/apps/opencs/view/render/cell.cpp index b0c8425ad3..f2c851cc72 100644 --- a/apps/opencs/view/render/cell.cpp +++ b/apps/opencs/view/render/cell.cpp @@ -612,7 +612,7 @@ osg::ref_ptr CSVRender::Cell::getSnapTarget(unsigned int ele return result; } -void CSVRender::Cell::selectFromGroup(const std::vector group) +void CSVRender::Cell::selectFromGroup(const std::vector& group) { for (const auto& [_, object] : mObjects) { diff --git a/apps/opencs/view/render/cell.hpp b/apps/opencs/view/render/cell.hpp index 52e01c631a..5bfce47904 100644 --- a/apps/opencs/view/render/cell.hpp +++ b/apps/opencs/view/render/cell.hpp @@ -148,7 +148,7 @@ namespace CSVRender // already selected void selectAllWithSameParentId(int elementMask); - void selectFromGroup(const std::vector group); + void selectFromGroup(const std::vector& group); void unhideAll(); diff --git a/apps/opencs/view/render/object.cpp b/apps/opencs/view/render/object.cpp index 0e114ac06e..4ad1aaca15 100644 --- a/apps/opencs/view/render/object.cpp +++ b/apps/opencs/view/render/object.cpp @@ -484,7 +484,7 @@ CSVRender::Object::~Object() mParentNode->removeChild(mRootNode); } -void CSVRender::Object::setSelected(bool selected, osg::Vec4f color) +void CSVRender::Object::setSelected(bool selected, const osg::Vec4f& color) { mSelected = selected; diff --git a/apps/opencs/view/render/object.hpp b/apps/opencs/view/render/object.hpp index 9b18b99561..5c73b12211 100644 --- a/apps/opencs/view/render/object.hpp +++ b/apps/opencs/view/render/object.hpp @@ -139,7 +139,7 @@ namespace CSVRender ~Object(); /// Mark the object as selected, selected objects show an outline effect - void setSelected(bool selected, osg::Vec4f color = osg::Vec4f(1, 1, 1, 1)); + void setSelected(bool selected, const osg::Vec4f& color = osg::Vec4f(1, 1, 1, 1)); bool getSelected() const; diff --git a/apps/opencs/view/render/pagedworldspacewidget.cpp b/apps/opencs/view/render/pagedworldspacewidget.cpp index fab706e3ca..3d5c6fe565 100644 --- a/apps/opencs/view/render/pagedworldspacewidget.cpp +++ b/apps/opencs/view/render/pagedworldspacewidget.cpp @@ -875,7 +875,7 @@ std::vector> CSVRender::PagedWorldspaceWidget:: return result; } -void CSVRender::PagedWorldspaceWidget::selectGroup(std::vector group) const +void CSVRender::PagedWorldspaceWidget::selectGroup(const std::vector& group) const { for (const auto& [_, cell] : mCells) cell->selectFromGroup(group); diff --git a/apps/opencs/view/render/pagedworldspacewidget.hpp b/apps/opencs/view/render/pagedworldspacewidget.hpp index 3d2ab97e89..744cc7ccb9 100644 --- a/apps/opencs/view/render/pagedworldspacewidget.hpp +++ b/apps/opencs/view/render/pagedworldspacewidget.hpp @@ -163,7 +163,7 @@ namespace CSVRender std::vector> getSelection(unsigned int elementMask) const override; - void selectGroup(const std::vector group) const override; + void selectGroup(const std::vector& group) const override; void unhideAll() const override; diff --git a/apps/opencs/view/render/unpagedworldspacewidget.cpp b/apps/opencs/view/render/unpagedworldspacewidget.cpp index ea99294c28..899918c3b9 100644 --- a/apps/opencs/view/render/unpagedworldspacewidget.cpp +++ b/apps/opencs/view/render/unpagedworldspacewidget.cpp @@ -199,7 +199,7 @@ std::vector> CSVRender::UnpagedWorldspaceWidget return mCell->getSelection(elementMask); } -void CSVRender::UnpagedWorldspaceWidget::selectGroup(const std::vector group) const +void CSVRender::UnpagedWorldspaceWidget::selectGroup(const std::vector& group) const { mCell->selectFromGroup(group); } diff --git a/apps/opencs/view/render/unpagedworldspacewidget.hpp b/apps/opencs/view/render/unpagedworldspacewidget.hpp index 22a0475fe2..89c916415d 100644 --- a/apps/opencs/view/render/unpagedworldspacewidget.hpp +++ b/apps/opencs/view/render/unpagedworldspacewidget.hpp @@ -93,7 +93,7 @@ namespace CSVRender std::vector> getSelection(unsigned int elementMask) const override; - void selectGroup(const std::vector group) const override; + void selectGroup(const std::vector& group) const override; void unhideAll() const override; diff --git a/apps/opencs/view/render/worldspacewidget.hpp b/apps/opencs/view/render/worldspacewidget.hpp index a6d87440f1..505d985ffa 100644 --- a/apps/opencs/view/render/worldspacewidget.hpp +++ b/apps/opencs/view/render/worldspacewidget.hpp @@ -201,7 +201,7 @@ namespace CSVRender virtual std::vector> getSelection(unsigned int elementMask) const = 0; - virtual void selectGroup(const std::vector) const = 0; + virtual void selectGroup(const std::vector&) const = 0; virtual void unhideAll() const = 0;