Skip to content

Commit

Permalink
Return false on mismatching name
Browse files Browse the repository at this point in the history
  • Loading branch information
RainerKuemmerle committed Dec 31, 2024
1 parent 6c9a9df commit c33523b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion g2o/core/hyper_graph_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ bool HyperGraphElementActionCollection::registerAction(
"invalid attempt to register an action in a collection with a "
"different name {} {}",
name(), action->name());
return false;

Check warning on line 75 in g2o/core/hyper_graph_action.cpp

View check run for this annotation

Codecov / codecov/patch

g2o/core/hyper_graph_action.cpp#L75

Added line #L75 was not covered by tests
}
actionMap_.insert(make_pair(action->typeName(), action));
return true;
Expand Down Expand Up @@ -174,7 +175,7 @@ DrawAction::Parameters* DrawAction::refreshPropertyPtrs(
previousParams_ = nullptr;
show_ = nullptr;
} else {
previousParams_ = &p;
previousParams_ = p;

Check warning on line 178 in g2o/core/hyper_graph_action.cpp

View check run for this annotation

Codecov / codecov/patch

g2o/core/hyper_graph_action.cpp#L178

Added line #L178 was not covered by tests
show_ = p->makeProperty<BoolProperty>(typeName_ + "::SHOW", true);
}
return p;
Expand Down

0 comments on commit c33523b

Please sign in to comment.