We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d1f66c0 + c70f2e0 commit adc80ecCopy full SHA for adc80ec
lib/DependencyScan/ScanDependencies.cpp
@@ -170,10 +170,11 @@ static void removeMacroSearchPaths(std::vector<std::string> &cmd) {
170
};
171
172
// Remove macro search path option and its argument.
173
- for (auto it = cmd.begin(), ie=cmd.end(); it != ie; ++it) {
174
- if (macroSearchOptions.contains(*it) && it + 1 != ie) {
+ for (auto it = cmd.begin(); it != cmd.end();) {
+ if (macroSearchOptions.contains(*it) && it + 1 != cmd.end())
175
it = cmd.erase(it, it + 2);
176
- }
+ else
177
+ ++it;
178
}
179
180
0 commit comments