MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / FindRule

Function FindRule

src/OpenColorIO/ViewingRules.cpp:467–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467bool FindRule(ConstViewingRulesRcPtr vr, const std::string & name, size_t & ruleIndex)
468{
469 const auto numrules = vr->getNumEntries();
470 for (size_t index = 0; index < numrules; ++index)
471 {
472 const std::string ruleName{ vr->getName(index) };
473 if (StrEqualsCaseIgnore(ruleName, name))
474 {
475 ruleIndex = index;
476 return true;
477 }
478 }
479 return false;
480}
481
482} // namespace OCIO_NAMESPACE

Callers 2

validateViewMethod · 0.85
getFilteredViewsMethod · 0.85

Calls 3

StrEqualsCaseIgnoreFunction · 0.85
getNumEntriesMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected