diff options
Diffstat (limited to 'libtransport/src/utils/min_filter.h')
-rw-r--r-- | libtransport/src/utils/min_filter.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libtransport/src/utils/min_filter.h b/libtransport/src/utils/min_filter.h index 092555ce0..4a3882601 100644 --- a/libtransport/src/utils/min_filter.h +++ b/libtransport/src/utils/min_filter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Cisco and/or its affiliates. + * Copyright (c) 2021 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -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_; |