| 160 | namespace |
| 161 | { |
| 162 | void 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 | |
| 182 | int ParseColorSpaceFromString(const Config & config, const char * str) |
no test coverage detected