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

Function AdjustRightmost

src/OpenColorIO/PathUtils.cpp:162–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160namespace
161{
162void AdjustRightmost(const std::string & name, int index, int & colorspacePos,
163 int & rightMostColorPos, std::string & rightMostColorspace,
164 int & rightMostColorSpaceIndex)
165{
166 // If we have found a match, move the pointer over to the right end
167 // of the substring. This will allow us to find the longest name
168 // that matches the rightmost colorspace
169 colorspacePos += (int)name.size();
170
171 if ((colorspacePos > rightMostColorPos) ||
172 ((colorspacePos == rightMostColorPos) && (name.size() > rightMostColorspace.size()))
173 )
174 {
175 rightMostColorPos = colorspacePos;
176 rightMostColorspace = name;
177 rightMostColorSpaceIndex = index;
178 }
179}
180}
181
182int ParseColorSpaceFromString(const Config & config, const char * str)

Callers 1

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected