summaryrefslogtreecommitdiff
path: root/chromium/net/third_party/quiche/src/quic/core/quic_interval.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/net/third_party/quiche/src/quic/core/quic_interval.h')
-rw-r--r--chromium/net/third_party/quiche/src/quic/core/quic_interval.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/chromium/net/third_party/quiche/src/quic/core/quic_interval.h b/chromium/net/third_party/quiche/src/quic/core/quic_interval.h
index 9e87ecd051f..81a4d626883 100644
--- a/chromium/net/third_party/quiche/src/quic/core/quic_interval.h
+++ b/chromium/net/third_party/quiche/src/quic/core/quic_interval.h
@@ -63,7 +63,7 @@
#include <utility>
#include <vector>
-#include "net/third_party/quiche/src/quic/platform/api/quic_export.h"
+#include "quic/platform/api/quic_export.h"
namespace quic {
@@ -152,6 +152,16 @@ class QUIC_NO_EXPORT QuicInterval {
// *this was modified.
bool IntersectWith(const QuicInterval& i);
+ // Returns true iff this and other have disjoint closures. For nonempty
+ // intervals, that means there is at least one point between this and other.
+ // Roughly speaking that means the intervals don't intersect, and they are not
+ // adjacent. Empty intervals are always separated from any other interval.
+ bool Separated(const QuicInterval& other) const {
+ if (Empty() || other.Empty())
+ return true;
+ return other.max() < min() || max() < other.min();
+ }
+
// Calculates the smallest QuicInterval containing both *this i, and updates
// *this to represent that QuicInterval, and returns true iff *this was
// modified.