diff --git a/src/preprocessor.cpp b/src/preprocessor.cpp index 4c32f770c..4870585c2 100644 --- a/src/preprocessor.cpp +++ b/src/preprocessor.cpp @@ -758,18 +758,8 @@ std::list Preprocessor::getcfgs(const std::string &filedata) } // Remove duplicates from the ret list.. - for (std::list::iterator it1 = ret.begin(); it1 != ret.end(); ++it1) - { - std::list::iterator it2 = it1; - ++it2; - while (it2 != ret.end()) - { - if (*it1 == *it2) - ret.erase(it2++); - else - ++it2; - } - } + ret.sort(); + ret.unique(); // cleanup unhandled configurations.. for (std::list::iterator it = ret.begin(); it != ret.end();) @@ -787,8 +777,6 @@ std::list Preprocessor::getcfgs(const std::string &filedata) ++it; } - ret.sort(); - return ret; }