mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-02 16:20:23 +00:00
Cleanup(CS): Pass const ref when applicable for selection groups
This commit is contained in:
parent
3ff1bae372
commit
c563219b61
@ -612,7 +612,7 @@ osg::ref_ptr<CSVRender::TagBase> CSVRender::Cell::getSnapTarget(unsigned int ele
|
|||||||
return result;
|
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)
|
for (const auto& [_, object] : mObjects)
|
||||||
{
|
{
|
||||||
|
@ -148,7 +148,7 @@ namespace CSVRender
|
|||||||
// already selected
|
// already selected
|
||||||
void selectAllWithSameParentId(int elementMask);
|
void selectAllWithSameParentId(int elementMask);
|
||||||
|
|
||||||
void selectFromGroup(const std::vector<std::string> group);
|
void selectFromGroup(const std::vector<std::string>& group);
|
||||||
|
|
||||||
void unhideAll();
|
void unhideAll();
|
||||||
|
|
||||||
|
@ -484,7 +484,7 @@ CSVRender::Object::~Object()
|
|||||||
mParentNode->removeChild(mRootNode);
|
mParentNode->removeChild(mRootNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVRender::Object::setSelected(bool selected, osg::Vec4f color)
|
void CSVRender::Object::setSelected(bool selected, const osg::Vec4f& color)
|
||||||
{
|
{
|
||||||
mSelected = selected;
|
mSelected = selected;
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ namespace CSVRender
|
|||||||
~Object();
|
~Object();
|
||||||
|
|
||||||
/// Mark the object as selected, selected objects show an outline effect
|
/// 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;
|
bool getSelected() const;
|
||||||
|
|
||||||
|
@ -875,7 +875,7 @@ std::vector<osg::ref_ptr<CSVRender::TagBase>> CSVRender::PagedWorldspaceWidget::
|
|||||||
return result;
|
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)
|
for (const auto& [_, cell] : mCells)
|
||||||
cell->selectFromGroup(group);
|
cell->selectFromGroup(group);
|
||||||
|
@ -163,7 +163,7 @@ namespace CSVRender
|
|||||||
|
|
||||||
std::vector<osg::ref_ptr<TagBase>> getSelection(unsigned int elementMask) const override;
|
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;
|
void unhideAll() const override;
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ std::vector<osg::ref_ptr<CSVRender::TagBase>> CSVRender::UnpagedWorldspaceWidget
|
|||||||
return mCell->getSelection(elementMask);
|
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);
|
mCell->selectFromGroup(group);
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ namespace CSVRender
|
|||||||
|
|
||||||
std::vector<osg::ref_ptr<TagBase>> getSelection(unsigned int elementMask) const override;
|
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;
|
void unhideAll() const override;
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ namespace CSVRender
|
|||||||
|
|
||||||
virtual std::vector<osg::ref_ptr<TagBase>> getSelection(unsigned int elementMask) const = 0;
|
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;
|
virtual void unhideAll() const = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user