diff --git a/lib/settings.cpp b/lib/settings.cpp index 4a09d6632..16bc139f6 100644 --- a/lib/settings.cpp +++ b/lib/settings.cpp @@ -54,7 +54,7 @@ void Settings::autoDealloc(std::istream &istr) continue; // Add classname to list - _autoDealloc.push_back(line); + _autoDealloc.insert(line); } } @@ -116,12 +116,12 @@ bool Settings::isSuppressed(const std::string &errorId, const std::string &file, void Settings::addAutoAllocClass(const std::string &name) { - _autoDealloc.push_back(name); + _autoDealloc.insert(name); } bool Settings::isAutoDealloc(const char classname[]) const { - return (std::find(_autoDealloc.begin(), _autoDealloc.end(), classname) != _autoDealloc.end()); + return (_autoDealloc.find(classname) != _autoDealloc.end()); } diff --git a/lib/settings.h b/lib/settings.h index 3d1af764f..5ee008b03 100644 --- a/lib/settings.h +++ b/lib/settings.h @@ -23,6 +23,7 @@ #include #include #include +#include /// @addtogroup Core /// @{ @@ -37,7 +38,7 @@ class Settings { private: /** classes that are automaticly deallocated */ - std::list _autoDealloc; + std::set _autoDealloc; /** Code to append in the checks */ std::string _append;