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

Function Remove

src/utils/StringUtils.h:291–305  ·  view source on GitHub ↗

Remove the 'entry' from the 'list' using a case insensitive comparison. It returns true if found.

Source from the content-addressed store, hash-verified

289// Remove the 'entry' from the 'list' using a case insensitive comparison.
290// It returns true if found.
291inline bool Remove(StringVec & list, const std::string & entry)
292{
293 const auto it = std::find_if(list.begin(), list.end(),
294 [entry](const std::string & ent)
295 {
296 return Compare(ent.c_str(), entry.c_str());
297 });
298 if (it!=list.end())
299 {
300 list.erase(it);
301 return true;
302 }
303
304 return false;
305}
306
307} // namespace StringUtils
308

Callers 9

setNameMethod · 0.85
removeAliasMethod · 0.85
setNameMethod · 0.85
removeAliasMethod · 0.85
removeDisplayViewMethod · 0.85
RemoveActiveDisplayViewFunction · 0.85
handleRemoveMethod · 0.85
OCIO_ADD_TESTFunction · 0.85

Calls 4

CompareFunction · 0.85
eraseMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by 1

OCIO_ADD_TESTFunction · 0.68