Fixed #585 (Preprocessor: Don't check the same configuration twice)
http://sourceforge.net/apps/trac/cppcheck/ticket/585
This commit is contained in:
parent
a9273c9d39
commit
195cc9aae9
|
@ -643,10 +643,16 @@ std::list<std::string> Preprocessor::getcfgs(const std::string &filedata)
|
|||
break;
|
||||
if (*it == "1")
|
||||
continue;
|
||||
|
||||
// don't add "T;T":
|
||||
// treat two and more similar nested conditions as one
|
||||
if (def != *it)
|
||||
{
|
||||
if (! def.empty())
|
||||
def += ";";
|
||||
def += *it;
|
||||
}
|
||||
}
|
||||
|
||||
if (std::find(ret.begin(), ret.end(), def) == ret.end())
|
||||
ret.push_back(def);
|
||||
|
|
Loading…
Reference in New Issue