diff --git a/lib/library.cpp b/lib/library.cpp index 0e7496f4d..557acc8d5 100644 --- a/lib/library.cpp +++ b/lib/library.cpp @@ -179,7 +179,7 @@ bool Library::load(const tinyxml2::XMLDocument &doc) argumentChecks[name][nr].strz = strz; argumentChecks[name][nr].valid = valid; } else if (strcmp(functionnode->Name(), "ignorefunction") == 0) { - _ignorefunction[name] = (strcmp(functionnode->GetText(), "true") == 0); + _ignorefunction.insert(name); } else return false; } diff --git a/lib/library.h b/lib/library.h index ce74c1054..9b9ae98ba 100644 --- a/lib/library.h +++ b/lib/library.h @@ -159,8 +159,7 @@ public: } bool ignorefunction(const std::string &function) const { - const std::map::const_iterator it = _ignorefunction.find(function); - return (it != _ignorefunction.end() && it->second); + return (_ignorefunction.find(function) != _ignorefunction.end()); } bool isexecutableblock(const std::string &file, const std::string &token) const { @@ -308,7 +307,7 @@ private: std::map _alloc; // allocation functions std::map _dealloc; // deallocation functions std::map _noreturn; // is function noreturn? - std::map _ignorefunction; // ignore functions/macros from a library (gtk, qt etc) + std::set _ignorefunction; // ignore functions/macros from a library (gtk, qt etc) std::map _reporterrors; std::set _markupExtensions; // file extensions of markup files std::map > _keywords; // keywords for code in the library