Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: compiled/filter/ElemHideBase.cpp

Issue 29404555: Noissue - Use iterators syntax consistently (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Created April 6, 2017, 8 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiled/filter/ActiveFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/filter/ElemHideBase.cpp
===================================================================
--- a/compiled/filter/ElemHideBase.cpp
+++ b/compiled/filter/ElemHideBase.cpp
@@ -128,20 +128,20 @@ Filter::Type ElemHideBase::Parse(Depende
}
OwnedString ElemHideBase::GetSelectorDomain() const
{
/* TODO this is inefficient */
OwnedString result;
if (mDomains)
{
- for (auto it = mDomains->begin(); it != mDomains->end(); ++it)
+ for (const auto& item : *mDomains)
{
- if (it->second && !it->first.empty())
+ if (item.second && !item.first.empty())
{
if (!result.empty())
result.append(u',');
- result.append(it->first);
+ result.append(item.first);
}
}
Wladimir Palant 2017/04/06 08:03:22 Interestingly, this change resulted in less compac
hub 2017/04/06 08:55:27 I'd be tempted to file a bug for that. How bad is
Wladimir Palant 2017/04/06 09:36:42 Actually, I got it backwards it seems - the code g
}
return result;
}
« no previous file with comments | « compiled/filter/ActiveFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld