Module: check_mk
Branch: master
Commit: 6f51e22365880c1c9b0fffee85616f71e1c91220
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6f51e22365880c…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Aug 16 10:33:27 2017 +0200
Const-corrected aggregator constructors.
Change-Id: I1bf16f1736f144fd43ab999b641dc2b76fa028d1
---
livestatus/src/CountAggregator.h | 4 ++--
livestatus/src/DoubleAggregator.h | 4 ++--
livestatus/src/IntAggregator.h | 4 ++--
livestatus/src/PerfdataAggregator.h | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/livestatus/src/CountAggregator.h b/livestatus/src/CountAggregator.h
index 77682a9..e08e1b1 100644
--- a/livestatus/src/CountAggregator.h
+++ b/livestatus/src/CountAggregator.h
@@ -40,14 +40,14 @@ class RowRenderer;
class CountAggregator : public Aggregator {
public:
- explicit CountAggregator(Filter *filter)
+ explicit CountAggregator(const Filter *filter)
: Aggregator(StatsOperation::count), _filter(filter), _count(0) {}
void consume(Row row, const contact *auth_user,
int timezone_offset) override;
void output(RowRenderer &r) const override;
private:
- Filter *const _filter;
+ const Filter *const _filter;
std::uint32_t _count;
};
diff --git a/livestatus/src/DoubleAggregator.h b/livestatus/src/DoubleAggregator.h
index fc0590d..1d6f71e 100644
--- a/livestatus/src/DoubleAggregator.h
+++ b/livestatus/src/DoubleAggregator.h
@@ -40,7 +40,7 @@ class RowRenderer;
class DoubleAggregator : public Aggregator {
public:
- DoubleAggregator(StatsOperation operation, DoubleColumn *column)
+ DoubleAggregator(StatsOperation operation, const DoubleColumn *column)
: Aggregator(operation)
, _column(column)
, _count(0)
@@ -50,7 +50,7 @@ public:
void output(RowRenderer &r) const override;
private:
- DoubleColumn *const _column;
+ const DoubleColumn *const _column;
std::uint32_t _count;
double _aggr;
double _sumq;
diff --git a/livestatus/src/IntAggregator.h b/livestatus/src/IntAggregator.h
index 4ebc439..28d306d 100644
--- a/livestatus/src/IntAggregator.h
+++ b/livestatus/src/IntAggregator.h
@@ -40,7 +40,7 @@ class RowRenderer;
class IntAggregator : public Aggregator {
public:
- IntAggregator(StatsOperation operation, IntColumn *column)
+ IntAggregator(StatsOperation operation, const IntColumn *column)
: Aggregator(operation)
, _column(column)
, _count(0)
@@ -51,7 +51,7 @@ public:
void output(RowRenderer &r) const override;
private:
- IntColumn *const _column;
+ const IntColumn *const _column;
std::uint32_t _count;
int64_t _aggr;
double _sumq;
diff --git a/livestatus/src/PerfdataAggregator.h b/livestatus/src/PerfdataAggregator.h
index 9f7de27..7ef8fed 100644
--- a/livestatus/src/PerfdataAggregator.h
+++ b/livestatus/src/PerfdataAggregator.h
@@ -41,7 +41,7 @@ class StringColumn;
class PerfdataAggregator : public Aggregator {
public:
- PerfdataAggregator(StatsOperation operation, StringColumn *column)
+ PerfdataAggregator(StatsOperation operation, const StringColumn *column)
: Aggregator(operation), _column(column) {}
void consume(Row row, const contact *auth_user,
int timezone_offset) override;
@@ -54,7 +54,7 @@ private:
double _sumq;
};
- StringColumn *const _column;
+ const StringColumn *const _column;
std::map<std::string, perf_aggr> _aggr;
void consumeVariable(const std::string &varname, double value);