Module: check_mk
Branch: master
Commit: 3f603964cd0d758bb39772e20c6e87873e000718
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3f603964cd0d75…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Aug 10 10:18:11 2017 +0200
Const-corrected Aggregator.
Change-Id: Id3f0c5391cc45858b3e2350b16800b03db37ddce
---
livestatus/src/Aggregator.h | 2 +-
livestatus/src/CountAggregator.cc | 2 +-
livestatus/src/CountAggregator.h | 2 +-
livestatus/src/DoubleAggregator.cc | 2 +-
livestatus/src/DoubleAggregator.h | 2 +-
livestatus/src/IntAggregator.cc | 2 +-
livestatus/src/IntAggregator.h | 2 +-
livestatus/src/PerfdataAggregator.cc | 2 +-
livestatus/src/PerfdataAggregator.h | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/livestatus/src/Aggregator.h b/livestatus/src/Aggregator.h
index b2f3f5a..d40e997 100644
--- a/livestatus/src/Aggregator.h
+++ b/livestatus/src/Aggregator.h
@@ -48,7 +48,7 @@ public:
// fixed, it is just an artifact.
virtual void consume(Row row, contact *auth_user, int timezone_offset) = 0;
- virtual void output(RowRenderer &r) = 0;
+ virtual void output(RowRenderer &r) const = 0;
private:
const StatsOperation _operation;
diff --git a/livestatus/src/CountAggregator.cc b/livestatus/src/CountAggregator.cc
index 46614c2..a5bd14d 100644
--- a/livestatus/src/CountAggregator.cc
+++ b/livestatus/src/CountAggregator.cc
@@ -36,4 +36,4 @@ void CountAggregator::consume(Row row, contact* auth_user,
}
}
-void CountAggregator::output(RowRenderer& r) { r.output(_count); }
+void CountAggregator::output(RowRenderer& r) const { r.output(_count); }
diff --git a/livestatus/src/CountAggregator.h b/livestatus/src/CountAggregator.h
index 1768f89..be2d69c 100644
--- a/livestatus/src/CountAggregator.h
+++ b/livestatus/src/CountAggregator.h
@@ -43,7 +43,7 @@ public:
explicit CountAggregator(Filter *filter)
: Aggregator(StatsOperation::count), _filter(filter), _count(0) {}
void consume(Row row, contact *auth_user, int timezone_offset) override;
- void output(RowRenderer &r) override;
+ void output(RowRenderer &r) const override;
private:
Filter *const _filter;
diff --git a/livestatus/src/DoubleAggregator.cc b/livestatus/src/DoubleAggregator.cc
index c7e31e3..2fa5bc5 100644
--- a/livestatus/src/DoubleAggregator.cc
+++ b/livestatus/src/DoubleAggregator.cc
@@ -74,7 +74,7 @@ void DoubleAggregator::consume(Row row, contact* /* auth_user */,
}
}
-void DoubleAggregator::output(RowRenderer& r) {
+void DoubleAggregator::output(RowRenderer& r) const {
switch (getOperation()) {
case StatsOperation::sum:
case StatsOperation::min:
diff --git a/livestatus/src/DoubleAggregator.h b/livestatus/src/DoubleAggregator.h
index 25dbbe7..c50fc26 100644
--- a/livestatus/src/DoubleAggregator.h
+++ b/livestatus/src/DoubleAggregator.h
@@ -47,7 +47,7 @@ public:
, _aggr(0)
, _sumq(0) {}
void consume(Row row, contact *contact, int timezone_offset) override;
- void output(RowRenderer &r) override;
+ void output(RowRenderer &r) const override;
private:
DoubleColumn *const _column;
diff --git a/livestatus/src/IntAggregator.cc b/livestatus/src/IntAggregator.cc
index 0e41571..e96445b 100644
--- a/livestatus/src/IntAggregator.cc
+++ b/livestatus/src/IntAggregator.cc
@@ -69,7 +69,7 @@ void IntAggregator::consume(Row row, contact *auth_user,
}
}
-void IntAggregator::output(RowRenderer &r) {
+void IntAggregator::output(RowRenderer &r) const {
switch (getOperation()) {
case StatsOperation::sum:
case StatsOperation::min:
diff --git a/livestatus/src/IntAggregator.h b/livestatus/src/IntAggregator.h
index 28e64ae..d864f33 100644
--- a/livestatus/src/IntAggregator.h
+++ b/livestatus/src/IntAggregator.h
@@ -47,7 +47,7 @@ public:
, _aggr(0)
, _sumq(0) {}
void consume(Row row, contact *auth_user, int timezone_offset) override;
- void output(RowRenderer &r) override;
+ void output(RowRenderer &r) const override;
private:
IntColumn *const _column;
diff --git a/livestatus/src/PerfdataAggregator.cc b/livestatus/src/PerfdataAggregator.cc
index f16a6f9..122607f 100644
--- a/livestatus/src/PerfdataAggregator.cc
+++ b/livestatus/src/PerfdataAggregator.cc
@@ -113,7 +113,7 @@ void PerfdataAggregator::consumeVariable(const string &varname,
double value) {
}
}
-void PerfdataAggregator::output(RowRenderer &r) {
+void PerfdataAggregator::output(RowRenderer &r) const {
string perf_data;
bool first = true;
for (const auto &entry : _aggr) {
diff --git a/livestatus/src/PerfdataAggregator.h b/livestatus/src/PerfdataAggregator.h
index 1f5c8e7..1a334dd 100644
--- a/livestatus/src/PerfdataAggregator.h
+++ b/livestatus/src/PerfdataAggregator.h
@@ -44,7 +44,7 @@ public:
PerfdataAggregator(StatsOperation operation, StringColumn *column)
: Aggregator(operation), _column(column) {}
void consume(Row row, contact *auth_user, int timezone_offset) override;
- void output(RowRenderer &r) override;
+ void output(RowRenderer &r) const override;
private:
struct perf_aggr {