Module: check_mk
Branch: master
Commit: 5253c39c5ea994ffae75704b085c452f34de5a10
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5253c39c5ea994…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Aug 16 10:42:42 2017 +0200
Const-corrected Column::createAggregator().
Change-Id: Ice72a62fe0789b168774d73cc1d194b2bed8e9af
---
livestatus/src/Column.cc | 2 +-
livestatus/src/Column.h | 2 +-
livestatus/src/DoubleColumn.cc | 2 +-
livestatus/src/DoubleColumn.h | 2 +-
livestatus/src/IntColumn.cc | 2 +-
livestatus/src/IntColumn.h | 2 +-
livestatus/src/OffsetPerfdataColumn.cc | 2 +-
livestatus/src/OffsetPerfdataColumn.h | 2 +-
livestatus/src/TimeColumn.cc | 2 +-
livestatus/src/TimeColumn.h | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/livestatus/src/Column.cc b/livestatus/src/Column.cc
index e7aa570..9949de4 100644
--- a/livestatus/src/Column.cc
+++ b/livestatus/src/Column.cc
@@ -59,6 +59,6 @@ unique_ptr<Filter> Column::createFilter(RelationalOperator
/*unused*/,
throw runtime_error("filtering on column " + _name + " not
supported");
}
-unique_ptr<Aggregator> Column::createAggregator(StatsOperation /*unused*/) {
+unique_ptr<Aggregator> Column::createAggregator(StatsOperation /*unused*/) const {
return nullptr;
}
diff --git a/livestatus/src/Column.h b/livestatus/src/Column.h
index c174866..25e168d 100644
--- a/livestatus/src/Column.h
+++ b/livestatus/src/Column.h
@@ -68,7 +68,7 @@ public:
virtual std::unique_ptr<Filter> createFilter(RelationalOperator relOp,
const std::string &value);
virtual std::unique_ptr<Aggregator> createAggregator(
- StatsOperation operation);
+ StatsOperation operation) const;
Logger *logger() const { return _logger; }
diff --git a/livestatus/src/DoubleColumn.cc b/livestatus/src/DoubleColumn.cc
index 17a362f..2b1262d 100644
--- a/livestatus/src/DoubleColumn.cc
+++ b/livestatus/src/DoubleColumn.cc
@@ -43,6 +43,6 @@ unique_ptr<Filter> DoubleColumn::createFilter(RelationalOperator
relOp,
}
unique_ptr<Aggregator> DoubleColumn::createAggregator(
- StatsOperation operation) {
+ StatsOperation operation) const {
return make_unique<DoubleAggregator>(operation, this);
}
diff --git a/livestatus/src/DoubleColumn.h b/livestatus/src/DoubleColumn.h
index 696fe93..f54bb29 100644
--- a/livestatus/src/DoubleColumn.h
+++ b/livestatus/src/DoubleColumn.h
@@ -48,7 +48,7 @@ public:
std::unique_ptr<Filter> createFilter(RelationalOperator relOp,
const std::string &value) override;
std::unique_ptr<Aggregator> createAggregator(
- StatsOperation operation) override;
+ StatsOperation operation) const override;
};
#endif // DoubleColumn_h
diff --git a/livestatus/src/IntColumn.cc b/livestatus/src/IntColumn.cc
index b75a59d..83ec65a 100644
--- a/livestatus/src/IntColumn.cc
+++ b/livestatus/src/IntColumn.cc
@@ -42,6 +42,6 @@ unique_ptr<Filter> IntColumn::createFilter(RelationalOperator
relOp,
return make_unique<IntFilter>(*this, relOp, value);
}
-unique_ptr<Aggregator> IntColumn::createAggregator(StatsOperation operation) {
+unique_ptr<Aggregator> IntColumn::createAggregator(StatsOperation operation) const
{
return make_unique<IntAggregator>(operation, this);
}
diff --git a/livestatus/src/IntColumn.h b/livestatus/src/IntColumn.h
index b1a61bb..d4f1175 100644
--- a/livestatus/src/IntColumn.h
+++ b/livestatus/src/IntColumn.h
@@ -54,7 +54,7 @@ public:
std::unique_ptr<Filter> createFilter(RelationalOperator relOp,
const std::string &value) override;
std::unique_ptr<Aggregator> createAggregator(
- StatsOperation operation) override;
+ StatsOperation operation) const override;
};
#endif // IntColumn_h
diff --git a/livestatus/src/OffsetPerfdataColumn.cc
b/livestatus/src/OffsetPerfdataColumn.cc
index b8b4eab..e785458 100644
--- a/livestatus/src/OffsetPerfdataColumn.cc
+++ b/livestatus/src/OffsetPerfdataColumn.cc
@@ -29,6 +29,6 @@ using std::make_unique;
using std::unique_ptr;
unique_ptr<Aggregator> OffsetPerfdataColumn::createAggregator(
- StatsOperation operation) {
+ StatsOperation operation) const {
return make_unique<PerfdataAggregator>(operation, this);
}
diff --git a/livestatus/src/OffsetPerfdataColumn.h
b/livestatus/src/OffsetPerfdataColumn.h
index 472d720..4ef1d33 100644
--- a/livestatus/src/OffsetPerfdataColumn.h
+++ b/livestatus/src/OffsetPerfdataColumn.h
@@ -41,7 +41,7 @@ public:
extra_offset, extra_extra_offset) {}
std::unique_ptr<Aggregator> createAggregator(
- StatsOperation operation) override;
+ StatsOperation operation) const override;
};
#endif // OffsetPerfdataColumn_h
diff --git a/livestatus/src/TimeColumn.cc b/livestatus/src/TimeColumn.cc
index 8eee2a4..5b1f1cc 100644
--- a/livestatus/src/TimeColumn.cc
+++ b/livestatus/src/TimeColumn.cc
@@ -44,6 +44,6 @@ unique_ptr<Filter> TimeColumn::createFilter(RelationalOperator
relOp,
return make_unique<TimeFilter>(*this, relOp, value);
}
-unique_ptr<Aggregator> TimeColumn::createAggregator(StatsOperation operation) {
+unique_ptr<Aggregator> TimeColumn::createAggregator(StatsOperation operation) const
{
return make_unique<IntAggregator>(operation, this);
}
diff --git a/livestatus/src/TimeColumn.h b/livestatus/src/TimeColumn.h
index 447ba39..0532848 100644
--- a/livestatus/src/TimeColumn.h
+++ b/livestatus/src/TimeColumn.h
@@ -51,7 +51,7 @@ public:
std::unique_ptr<Filter> createFilter(RelationalOperator relOp,
const std::string &value) override;
std::unique_ptr<Aggregator> createAggregator(
- StatsOperation operation) override;
+ StatsOperation operation) const override;
};
#endif // TimeColumn_h