Cleanup(CS): Pass const ref when applicable for selection groups

qt6_macos
Dave Corley 12 months ago
parent 3ff1bae372
commit c563219b61

@ -612,7 +612,7 @@ osg::ref_ptr<CSVRender::TagBase> CSVRender::Cell::getSnapTarget(unsigned int ele
return result;
}
void CSVRender::Cell::selectFromGroup(const std::vector<std::string> group)
void CSVRender::Cell::selectFromGroup(const std::vector<std::string>& group)
{
for (const auto& [_, object] : mObjects)
{

@ -148,7 +148,7 @@ namespace CSVRender
// already selected
void selectAllWithSameParentId(int elementMask);
void selectFromGroup(const std::vector<std::string> group);
void selectFromGroup(const std::vector<std::string>& group);
void unhideAll();

@ -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;

@ -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;

@ -875,7 +875,7 @@ std::vector<osg::ref_ptr<CSVRender::TagBase>> CSVRender::PagedWorldspaceWidget::
return result;
}
void CSVRender::PagedWorldspaceWidget::selectGroup(std::vector<std::string> group) const
void CSVRender::PagedWorldspaceWidget::selectGroup(const std::vector<std::string>& group) const
{
for (const auto& [_, cell] : mCells)
cell->selectFromGroup(group);

@ -163,7 +163,7 @@ namespace CSVRender
std::vector<osg::ref_ptr<TagBase>> getSelection(unsigned int elementMask) const override;
void selectGroup(const std::vector<std::string> group) const override;
void selectGroup(const std::vector<std::string>& group) const override;
void unhideAll() const override;

@ -199,7 +199,7 @@ std::vector<osg::ref_ptr<CSVRender::TagBase>> CSVRender::UnpagedWorldspaceWidget
return mCell->getSelection(elementMask);
}
void CSVRender::UnpagedWorldspaceWidget::selectGroup(const std::vector<std::string> group) const
void CSVRender::UnpagedWorldspaceWidget::selectGroup(const std::vector<std::string>& group) const
{
mCell->selectFromGroup(group);
}

@ -93,7 +93,7 @@ namespace CSVRender
std::vector<osg::ref_ptr<TagBase>> getSelection(unsigned int elementMask) const override;
void selectGroup(const std::vector<std::string> group) const override;
void selectGroup(const std::vector<std::string>& group) const override;
void unhideAll() const override;

@ -201,7 +201,7 @@ namespace CSVRender
virtual std::vector<osg::ref_ptr<TagBase>> getSelection(unsigned int elementMask) const = 0;
virtual void selectGroup(const std::vector<std::string>) const = 0;
virtual void selectGroup(const std::vector<std::string>&) const = 0;
virtual void unhideAll() const = 0;

Loading…
Cancel
Save