Skip to content

Commit 71f5e0b

Browse files
committed
restore and suppress inline
Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
1 parent 80587bc commit 71f5e0b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

system/diagnostic_graph_aggregator/src/common/graph/units.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,16 @@ void MaxUnit::update_status()
151151
status_.level = std::min(level, DiagnosticStatus::ERROR);
152152
}
153153

154+
void ShortCircuitMaxUnit::update_status()
155+
{
156+
// TODO(Takagi, Isamu): update link flags.
157+
DiagnosticLevel level = DiagnosticStatus::OK;
158+
for (const auto & link : links_) {
159+
level = std::max(level, link->child()->level());
160+
}
161+
status_.level = std::min(level, DiagnosticStatus::ERROR);
162+
}
163+
154164
MinUnit::MinUnit(const UnitLoader & unit) : NodeUnit(unit)
155165
{
156166
links_ = unit.children();

system/diagnostic_graph_aggregator/src/common/graph/units.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ class ShortCircuitMaxUnit : public MaxUnit
137137
public:
138138
using MaxUnit::MaxUnit;
139139
std::string type() const override { return unit_name::short_circuit_max; }
140+
141+
private:
142+
void update_status() override; // cppcheck-suppress uselessOverride
140143
};
141144

142145
class MinUnit : public NodeUnit

0 commit comments

Comments
 (0)