]> granicus.if.org Git - icinga2/blobdiff - lib/livestatus/maxaggregator.hpp
Move CompatUtility::GetCheckableInCheckPeriod() into Livestatus feature
[icinga2] / lib / livestatus / maxaggregator.hpp
index fb9188886e08835809549015e74ad3c9127a5785..3207159f1cf0ac5dc49e19d335cea1ce747b7e2a 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  * Icinga 2                                                                   *
- * Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/)  *
+ * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)  *
  *                                                                            *
  * This program is free software; you can redistribute it and/or              *
  * modify it under the terms of the GNU General Public License                *
@@ -29,27 +29,23 @@ namespace icinga
 /**
  * @ingroup livestatus
  */
-struct I2_LIVESTATUS_API MaxAggregatorState : public AggregatorState
+struct MaxAggregatorState final : public AggregatorState
 {
-       MaxAggregatorState(void)
-           : Max(0)
-       { }
-
-       double Max;
+       double Max{0};
 };
 
 /**
  * @ingroup livestatus
  */
-class I2_LIVESTATUS_API MaxAggregator : public Aggregator
+class MaxAggregator final : public Aggregator
 {
 public:
        DECLARE_PTR_TYPEDEFS(MaxAggregator);
 
-       MaxAggregator(const String& attr);
+       MaxAggregator(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_MaxAttr;