diff options
Diffstat (limited to 'chromium/net/third_party/quiche/src/quic/core/quic_interval_set.h')
-rw-r--r-- | chromium/net/third_party/quiche/src/quic/core/quic_interval_set.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/chromium/net/third_party/quiche/src/quic/core/quic_interval_set.h b/chromium/net/third_party/quiche/src/quic/core/quic_interval_set.h index 28153c19088..7ab06475792 100644 --- a/chromium/net/third_party/quiche/src/quic/core/quic_interval_set.h +++ b/chromium/net/third_party/quiche/src/quic/core/quic_interval_set.h @@ -67,18 +67,18 @@ namespace quic { template <typename T> class QUIC_NO_EXPORT QuicIntervalSet { public: - typedef QuicInterval<T> value_type; + using value_type = QuicInterval<T>; private: struct QUIC_NO_EXPORT IntervalLess { bool operator()(const value_type& a, const value_type& b) const; }; // TODO(wub): Switch to absl::btree_set when it is available in Chromium. - typedef std::set<value_type, IntervalLess> Set; + using Set = std::set<value_type, IntervalLess>; public: - typedef typename Set::const_iterator const_iterator; - typedef typename Set::const_reverse_iterator const_reverse_iterator; + using const_iterator = typename Set::const_iterator; + using const_reverse_iterator = typename Set::const_reverse_iterator; // Instantiates an empty QuicIntervalSet. QuicIntervalSet() {} @@ -350,9 +350,6 @@ class QUIC_NO_EXPORT QuicIntervalSet { return *this; } - // Swap this QuicIntervalSet with *other. This is a constant-time operation. - void Swap(QuicIntervalSet<T>* other) { intervals_.swap(other->intervals_); } - friend bool operator==(const QuicIntervalSet& a, const QuicIntervalSet& b) { return a.Size() == b.Size() && std::equal(a.begin(), a.end(), b.begin(), NonemptyIntervalEq()); @@ -438,9 +435,6 @@ auto operator<<(std::ostream& out, const QuicIntervalSet<T>& seq) return out; } -template <typename T> -void swap(QuicIntervalSet<T>& x, QuicIntervalSet<T>& y); - //============================================================================== // Implementation details: Clients can stop reading here. @@ -918,11 +912,6 @@ bool QuicIntervalSet<T>::Valid() const { return true; } -template <typename T> -void swap(QuicIntervalSet<T>& x, QuicIntervalSet<T>& y) { - x.Swap(&y); -} - // This comparator orders intervals first by ascending min() and then by // descending max(). Readers who are satisified with that explanation can stop // reading here. The remainder of this comment is for the benefit of future |