Gui: apply std::ranges

This commit is contained in:
bofdahof
2025-03-12 17:47:04 +10:00
committed by Chris Hennes
parent 77689e3bb1
commit e5b06ae736
15 changed files with 42 additions and 41 deletions

View File

@@ -164,7 +164,7 @@ void ViewProviderVRMLObject::addResource(const SbString& url, std::list<std::str
Base::FileInfo fi(found.getString());
if (fi.exists()) {
// add the resource file if not yet listed
if (std::find(resources.begin(), resources.end(), found.getString()) == resources.end()) {
if (std::ranges::find(resources, found.getString()) == resources.end()) {
resources.emplace_back(found.getString());
}
}
@@ -186,7 +186,7 @@ void ViewProviderVRMLObject::getLocalResources(SoNode* node, std::list<std::stri
const SbString& url = vrml->getFullURLName();
if (url.getLength() > 0) {
// add the resource file if not yet listed
if (std::find(resources.begin(), resources.end(), url.getString()) == resources.end()) {
if (std::ranges::find(resources, url.getString()) == resources.end()) {
resources.emplace_back(url.getString());
}