Fixed clazy warnings: unnecessary containers and containers being detached.

This commit is contained in:
Mat Sutcliffe
2018-12-17 17:43:31 +00:00
parent 462172a87f
commit c71d358648
9 changed files with 14 additions and 14 deletions

View File

@@ -82,8 +82,8 @@ namespace BlackMisc
auto finder = [ & ](const PatternPair &pair) { return pair.first == pattern; };
auto comparator = [](const PatternPair &a, const PatternPair &b) { return a.first.isProperSubsetOf(b.first); };
auto it = std::find_if(m_patternHandlers.begin(), m_patternHandlers.end(), finder);
if (it == m_patternHandlers.end())
auto it = std::find_if(m_patternHandlers.cbegin(), m_patternHandlers.cend(), finder);
if (it == m_patternHandlers.cend())
{
auto *handler = new CLogPatternHandler(this, pattern);
topologicallySortedInsert(m_patternHandlers, PatternPair(pattern, handler), comparator);