File tree 2 files changed +13
-0
lines changed
system/diagnostic_graph_aggregator/src/common/graph
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,16 @@ void MaxUnit::update_status()
151
151
status_.level = std::min (level, DiagnosticStatus::ERROR);
152
152
}
153
153
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
+
154
164
MinUnit::MinUnit (const UnitLoader & unit) : NodeUnit(unit)
155
165
{
156
166
links_ = unit.children ();
Original file line number Diff line number Diff line change @@ -137,6 +137,9 @@ class ShortCircuitMaxUnit : public MaxUnit
137
137
public:
138
138
using MaxUnit::MaxUnit;
139
139
std::string type () const override { return unit_name::short_circuit_max; }
140
+
141
+ private:
142
+ void update_status () override ; // cppcheck-suppress uselessOverride
140
143
};
141
144
142
145
class MinUnit : public NodeUnit
You can’t perform that action at this time.
0 commit comments