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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « compiled/filter/ActiveFilter.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 return Type::ELEMHIDE; 127 return Type::ELEMHIDE;
128 } 128 }
129 129
130 OwnedString ElemHideBase::GetSelectorDomain() const 130 OwnedString ElemHideBase::GetSelectorDomain() const
131 { 131 {
132 /* TODO this is inefficient */ 132 /* TODO this is inefficient */
133 OwnedString result; 133 OwnedString result;
134 if (mDomains) 134 if (mDomains)
135 { 135 {
136 for (auto it = mDomains->begin(); it != mDomains->end(); ++it) 136 for (const auto& item : *mDomains)
137 { 137 {
138 if (it->second && !it->first.empty()) 138 if (item.second && !item.first.empty())
139 { 139 {
140 if (!result.empty()) 140 if (!result.empty())
141 result.append(u','); 141 result.append(u',');
142 result.append(it->first); 142 result.append(item.first);
143 } 143 }
144 } 144 }
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
145 } 145 }
146 return result; 146 return result;
147 } 147 }
OLDNEW
« 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