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

Function IsEncodingUsed

src/OpenColorIO/ViewingRules.cpp:20–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18namespace
19{
20bool IsEncodingUsed(const ColorSpaceSetRcPtr & colorspaces, const char * encName)
21{
22 const std::string teststr = StringUtils::Lower(encName);
23 const int numCS = colorspaces->getNumColorSpaces();
24 for (int cs = 0; cs < numCS; ++cs)
25 {
26 auto colorspace = colorspaces->getColorSpaceByIndex(cs);
27 const std::string csis{ colorspace->getEncoding() };
28 if (StringUtils::Lower(csis) == teststr)
29 {
30 return true;
31 }
32 }
33 return false;
34}
35}
36
37class ViewingRule

Callers 1

validateMethod · 0.85

Calls 4

LowerFunction · 0.85
getColorSpaceByIndexMethod · 0.80
getNumColorSpacesMethod · 0.45
getEncodingMethod · 0.45

Tested by

no test coverage detected