diff options
author | Mauro <you@example.com> | 2021-06-30 07:57:22 +0000 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2021-07-06 16:16:04 +0000 |
commit | 08233d44a6cfde878d7e10bca38ae935ed1c8fd5 (patch) | |
tree | 7ecc534d55bdc7e8dd15ecab084720910bcdf4d9 /libtransport/src/utils/min_filter.h | |
parent | 147ba39bed26887f5eba84757e2463ab8e370a9a (diff) |
[HICN-713] Transport Library Major Refactoring 2
Co-authored-by: Luca Muscariello <muscariello@ieee.org>
Co-authored-by: Michele Papalini <micpapal@cisco.com>
Co-authored-by: Olivier Roques <oroques+fdio@cisco.com>
Co-authored-by: Giulio Grassi <gigrassi@cisco.com>
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2
Diffstat (limited to 'libtransport/src/utils/min_filter.h')
-rw-r--r-- | libtransport/src/utils/min_filter.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libtransport/src/utils/min_filter.h b/libtransport/src/utils/min_filter.h index f1aaea7a8..092555ce0 100644 --- a/libtransport/src/utils/min_filter.h +++ b/libtransport/src/utils/min_filter.h @@ -15,9 +15,6 @@ #pragma once -#include <hicn/transport/portability/portability.h> -#include <hicn/transport/utils/log.h> - #include <deque> #include <iostream> #include <set> @@ -34,7 +31,7 @@ class MinFilter { std::size_t size() { return by_arrival_.size(); } template <typename R> - TRANSPORT_ALWAYS_INLINE void pushBack(R&& value) { + void pushBack(R&& value) { if (by_arrival_.size() >= size_) { by_order_.erase(by_arrival_.back()); by_arrival_.pop_back(); @@ -43,14 +40,14 @@ class MinFilter { by_arrival_.push_front(by_order_.insert(std::forward<R>(value))); } - TRANSPORT_ALWAYS_INLINE void clear() { + void clear() { by_arrival_.clear(); by_order_.clear(); } - TRANSPORT_ALWAYS_INLINE const T& begin() { return *by_order_.cbegin(); } + const T& begin() { return *by_order_.cbegin(); } - TRANSPORT_ALWAYS_INLINE const T& rBegin() { return *by_order_.crbegin(); } + const T& rBegin() { return *by_order_.crbegin(); } private: std::multiset<T> by_order_; |