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

Method getRuleFromFilepath

src/OpenColorIO/FileRules.cpp:632–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

630}
631
632const char * FileRules::Impl::getRuleFromFilepath(const Config & config, const char * filePath,
633 size_t & ruleIndex) const
634{
635 const auto numRules = m_rules.size();
636 for (size_t i = 0; i < numRules; ++i)
637 {
638 if (m_rules[i]->matches(config, filePath))
639 {
640 ruleIndex = i;
641 return m_rules[i]->getColorSpace();
642 }
643 }
644 // Should not be reached since the default rule always matches.
645 return m_rules.back()->getColorSpace();
646}
647
648void FileRules::Impl::moveRule(size_t ruleIndex, int offset)
649{

Callers

nothing calls this directly

Calls 4

matchesMethod · 0.80
sizeMethod · 0.45
getColorSpaceMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected