Internal QUICHE change
PiperOrigin-RevId: 337899149
Change-Id: Ia49f2a6680adab9e11679f99bcd49aa9717c17a2
diff --git a/quic/core/quic_interval_set.h b/quic/core/quic_interval_set.h
index 28153c1..2d44f2b 100644
--- a/quic/core/quic_interval_set.h
+++ b/quic/core/quic_interval_set.h
@@ -350,9 +350,6 @@
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 @@
return out;
}
-template <typename T>
-void swap(QuicIntervalSet<T>& x, QuicIntervalSet<T>& y);
-
//==============================================================================
// Implementation details: Clients can stop reading here.
@@ -918,11 +912,6 @@
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
diff --git a/quic/core/quic_interval_set_test.cc b/quic/core/quic_interval_set_test.cc
index efa8fe7..30d08b8 100644
--- a/quic/core/quic_interval_set_test.cc
+++ b/quic/core/quic_interval_set_test.cc
@@ -971,10 +971,10 @@
a.Add(300, 400);
b.Add(100, 200);
b.Add(500, 600);
- a.Swap(&b);
+ std::swap(a, b);
EXPECT_TRUE(Check(a, 2, 100, 200, 500, 600));
EXPECT_TRUE(Check(b, 1, 300, 400));
- swap(a, b);
+ std::swap(a, b);
EXPECT_TRUE(Check(a, 1, 300, 400));
EXPECT_TRUE(Check(b, 2, 100, 200, 500, 600));
}