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

Function CheckDuplicates

src/OpenColorIO/OCIOYaml.cpp:301–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299// Duplicate Checker
300
301inline void CheckDuplicates(const YAML::Node & node)
302{
303 std::unordered_set<std::string> keyset;
304
305 for (Iterator iter = node.begin(); iter != node.end(); ++iter)
306 {
307 const std::string & key = iter->first.as<std::string>();
308
309 if (keyset.find(key) == keyset.end())
310 {
311 keyset.insert(key);
312 }
313 else
314 {
315 std::ostringstream os;
316 os << "Key-value pair with key '" << key;
317 os << "' specified more than once. ";
318 throwValueError(node.Tag(), iter->first, os.str());
319 }
320 }
321}
322
323// Custom Key Loader
324

Callers 6

loadFunction · 0.85
loadOptionsMethod · 0.85
loadOverridesMethod · 0.85
loadParamsMethod · 0.85
loadMethod · 0.85
countMergesMethod · 0.85

Calls 4

throwValueErrorFunction · 0.85
insertMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected