]> granicus.if.org Git - icinga2/blobdiff - lib/livestatus/invavgaggregator.hpp
Merge branch 'support/2.8'
[icinga2] / lib / livestatus / invavgaggregator.hpp
index ef4090df59fc5edb381d1c5e1d4243b02797fa8f..d8e43d6aa4c809ec8c2e9c51a6d3ea16074d0ff7 100644 (file)
@@ -29,28 +29,24 @@ namespace icinga
 /**
  * @ingroup livestatus
  */
-struct InvAvgAggregatorState : public AggregatorState
+struct InvAvgAggregatorState final : public AggregatorState
 {
-       InvAvgAggregatorState(void)
-               : InvAvg(0), InvAvgCount(0)
-       { }
-
-       double InvAvg;
-       double InvAvgCount;
+       double InvAvg{0};
+       double InvAvgCount{0};
 };
 
 /**
  * @ingroup livestatus
  */
-class I2_LIVESTATUS_API InvAvgAggregator : public Aggregator
+class InvAvgAggregator final : public Aggregator
 {
 public:
        DECLARE_PTR_TYPEDEFS(InvAvgAggregator);
 
-       InvAvgAggregator(const String& attr);
+       InvAvgAggregator(String attr);
 
-       virtual void Apply(const Table::Ptr& table, const Value& row, AggregatorState **state) override;
-       virtual double GetResultAndFreeState(AggregatorState *state) const override;
+       void Apply(const Table::Ptr& table, const Value& row, AggregatorState **state) override;
+       double GetResultAndFreeState(AggregatorState *state) const override;
 
 private:
        String m_InvAvgAttr;