aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/src/utils')
-rw-r--r--libtransport/src/utils/max_filter.h6
-rw-r--r--libtransport/src/utils/min_filter.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/libtransport/src/utils/max_filter.h b/libtransport/src/utils/max_filter.h
index 7a2c6aace..db1a1a565 100644
--- a/libtransport/src/utils/max_filter.h
+++ b/libtransport/src/utils/max_filter.h
@@ -28,7 +28,7 @@ class MaxFilter {
public:
MaxFilter(std::size_t size) : size_(size) {}
- std::size_t size() { return by_arrival_.size(); }
+ std::size_t size() const { return by_arrival_.size(); }
template <typename R>
void pushBack(R&& value) {
@@ -45,9 +45,9 @@ class MaxFilter {
by_order_.clear();
}
- const T& begin() { return *by_order_.crbegin(); }
+ const T& begin() const { return *by_order_.crbegin(); }
- const T& rBegin() { return *by_order_.rbegin(); }
+ const T& rBegin() const { return *by_order_.rbegin(); }
private:
std::multiset<T> by_order_;
diff --git a/libtransport/src/utils/min_filter.h b/libtransport/src/utils/min_filter.h
index 4c7ae81f1..4a3882601 100644
--- a/libtransport/src/utils/min_filter.h
+++ b/libtransport/src/utils/min_filter.h
@@ -28,7 +28,7 @@ class MinFilter {
public:
MinFilter(std::size_t size) : size_(size) {}
- std::size_t size() { return by_arrival_.size(); }
+ std::size_t size() const { return by_arrival_.size(); }
template <typename R>
void pushBack(R&& value) {
@@ -45,9 +45,9 @@ class MinFilter {
by_order_.clear();
}
- const T& begin() { return *by_order_.cbegin(); }
+ const T& begin() const { return *by_order_.cbegin(); }
- const T& rBegin() { return *by_order_.crbegin(); }
+ const T& rBegin() const { return *by_order_.crbegin(); }
private:
std::multiset<T> by_order_;