diff --git a/diagnostic_aggregator/src/aggregator.cpp b/diagnostic_aggregator/src/aggregator.cpp index 11ff7e47..c8cf9eb9 100644 --- a/diagnostic_aggregator/src/aggregator.cpp +++ b/diagnostic_aggregator/src/aggregator.cpp @@ -221,7 +221,7 @@ void Aggregator::publishData() diag_toplevel_state.level = DiagnosticStatus::STALE; int max_level = -1; int min_level = 255; - uint non_ok_status_depth = 0; + int non_ok_status_depth = 0; std::shared_ptr msg_to_report; std::vector> processed; @@ -231,7 +231,7 @@ void Aggregator::publishData() } for (const auto & msg : processed) { diag_array.status.push_back(*msg); - const uint depth = static_cast(std::count(msg->name.begin(), msg->name.end(), '/')); + const auto depth = std::count(msg->name.begin(), msg->name.end(), '/'); if (msg->level > max_level) { max_level = msg->level; @@ -259,7 +259,7 @@ void Aggregator::publishData() other_analyzer_->report(); for (const auto & msg : processed_other) { diag_array.status.push_back(*msg); - const uint depth = static_cast(std::count(msg->name.begin(), msg->name.end(), '/')); + const auto depth = std::count(msg->name.begin(), msg->name.end(), '/'); if (msg->level > max_level) { max_level = msg->level;