MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / findDuplicateSymbolPattern

Method findDuplicateSymbolPattern

src/core/objects/symbol_rule_set.cpp:394–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392
393
394const Symbol* SymbolRuleSet::findDuplicateSymbolPattern() const
395{
396 for (auto const& item : *this)
397 {
398 if (item.query.getOperator() != ObjectQuery::OperatorSymbol)
399 continue;
400
401 auto has_conflict = [&item](const auto& other)->bool {
402 return &other != &item
403 && other.type != SymbolRule::NoAssignment
404 && item.query == other.query
405 && item.symbol != other.symbol;
406 };
407 using std::begin; using std::end;
408 if (std::any_of(begin(*this), end(*this), has_conflict))
409 {
410 return item.symbol;
411 }
412 }
413 return nullptr;
414}
415
416
417

Callers 1

loadCrtFileMethod · 0.80

Calls 1

getOperatorMethod · 0.80

Tested by

no test coverage detected