Points: apply std::ranges

This commit is contained in:
bofdahof
2025-03-12 20:04:51 +10:00
committed by Chris Hennes
parent 477f9aa401
commit ed2a99e37b
2 changed files with 32 additions and 32 deletions

View File

@@ -400,7 +400,7 @@ void ViewProviderScattered::attach(App::DocumentObject* pcObj)
addDisplayMaskMode(pcPointRoot, "Point");
// points shaded ---------------------------------------------
if (std::find(modes.begin(), modes.end(), std::string("Shaded")) != modes.end()) {
if (std::ranges::find(modes, std::string("Shaded")) != modes.end()) {
SoGroup* pcPointShadedRoot = new SoGroup();
pcPointShadedRoot->addChild(pcPointStyle);
pcPointShadedRoot->addChild(pcShapeMaterial);
@@ -410,8 +410,8 @@ void ViewProviderScattered::attach(App::DocumentObject* pcObj)
}
// color shaded ------------------------------------------
if (std::find(modes.begin(), modes.end(), std::string("Color")) != modes.end()
|| std::find(modes.begin(), modes.end(), std::string("Intensity")) != modes.end()) {
if (std::ranges::find(modes, std::string("Color")) != modes.end()
|| std::ranges::find(modes, std::string("Intensity")) != modes.end()) {
SoGroup* pcColorShadedRoot = new SoGroup();
pcColorShadedRoot->addChild(pcPointStyle);
SoMaterialBinding* pcMatBinding = new SoMaterialBinding;
@@ -572,7 +572,7 @@ void ViewProviderStructured::attach(App::DocumentObject* pcObj)
addDisplayMaskMode(pcPointRoot, "Point");
// points shaded ---------------------------------------------
if (std::find(modes.begin(), modes.end(), std::string("Shaded")) != modes.end()) {
if (std::ranges::find(modes, std::string("Shaded")) != modes.end()) {
SoGroup* pcPointShadedRoot = new SoGroup();
pcPointShadedRoot->addChild(pcPointStyle);
pcPointShadedRoot->addChild(pcShapeMaterial);
@@ -582,8 +582,8 @@ void ViewProviderStructured::attach(App::DocumentObject* pcObj)
}
// color shaded ------------------------------------------
if (std::find(modes.begin(), modes.end(), std::string("Color")) != modes.end()
|| std::find(modes.begin(), modes.end(), std::string("Intensity")) != modes.end()) {
if (std::ranges::find(modes, std::string("Color")) != modes.end()
|| std::ranges::find(modes, std::string("Intensity")) != modes.end()) {
SoGroup* pcColorShadedRoot = new SoGroup();
pcColorShadedRoot->addChild(pcPointStyle);
SoMaterialBinding* pcMatBinding = new SoMaterialBinding;