Skip to content

Commit

Permalink
Update config_utilities/include/config_utilities/factory.h
Browse files Browse the repository at this point in the history
uses member method instead of reimplementing

Co-authored-by: Lukas Schmid <[email protected]>
  • Loading branch information
nathanhhughes and Schmluk authored Aug 9, 2024
1 parent 395e71c commit dee72b0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions config_utilities/include/config_utilities/factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ template <typename Factory>
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;
}

Expand Down

0 comments on commit dee72b0

Please sign in to comment.