diff --git a/config_utilities/include/config_utilities/factory.h b/config_utilities/include/config_utilities/factory.h index ddd9d19..0a220be 100644 --- a/config_utilities/include/config_utilities/factory.h +++ b/config_utilities/include/config_utilities/factory.h @@ -122,8 +122,7 @@ template struct FactoryMap : FactoryMapBase { //! @brief Add entries to the map with verbose warnings. bool addEntry(const std::string& type, const Factory& method) { - const auto has_type = map.find(type) != map.end(); - if (has_type) { + if (hasEntry(type)) { return false; }