diff --git a/broker/bam/src/ba.cc b/broker/bam/src/ba.cc index 7cfbfd6e87a..21f3407b805 100644 --- a/broker/bam/src/ba.cc +++ b/broker/bam/src/ba.cc @@ -40,19 +40,6 @@ auto normalize = [](double d) -> double { return d; }; -static bool _every_kpi_in_dt( - std::unordered_map& imp) { - if (imp.empty()) - return false; - - for (auto it = imp.begin(), end = imp.end(); it != end; ++it) { - if (!it->first->in_downtime()) - return false; - } - - return true; -} - /** * Constructor. * @@ -312,6 +299,19 @@ state ba::get_state_hard() { return state_ok; }; + auto every_kpi_in_dt = + [](std::unordered_map& imp) -> bool { + if (imp.empty()) + return false; + + for (auto it = imp.begin(), end = imp.end(); it != end; ++it) { + if (!it->first->in_downtime()) + return false; + } + + return true; + }; + switch (_state_source) { case configuration::ba::state_source_impact: if (!_valid) @@ -326,7 +326,7 @@ state ba::get_state_hard() { case configuration::ba::state_source_best: case configuration::ba::state_source_worst: if (_dt_behaviour == configuration::ba::dt_ignore_kpi && - _every_kpi_in_dt(_impacts)) + every_kpi_in_dt(_impacts)) state = state_ok; else state = _computed_hard_state; diff --git a/broker/bam/src/configuration/bool_expression.cc b/broker/bam/src/configuration/bool_expression.cc index 5adb7774459..86a44b14ed3 100644 --- a/broker/bam/src/configuration/bool_expression.cc +++ b/broker/bam/src/configuration/bool_expression.cc @@ -141,10 +141,10 @@ void bool_expression::set_name(std::string const& name) { /** * Set expression * - * @param[in] exp Set the textual value for the expression. + * @param[in] expr Set the textual value for the expression. */ -void bool_expression::set_expression(std::string const& exp) { - _expression = exp; +void bool_expression::set_expression(std::string const& expr) { + _expression = expr; } /**