Skip to content

Commit

Permalink
Fix code-analyser bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Timple committed Feb 6, 2023
1 parent a09a02a commit d43019d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diagnostic_aggregator/src/aggregator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ void Aggregator::checkTimestamp(const DiagnosticArray::SharedPtr diag_msg)
stamp_warn += it->name;
}

if (!ros_warnings_.count(stamp_warn)) {
auto result = ros_warnings_.insert(stamp_warn);
if (result.second) {
RCLCPP_WARN(logger_, "%s", stamp_warn.c_str());
ros_warnings_.insert(stamp_warn);
}
}

Expand Down

0 comments on commit d43019d

Please sign in to comment.