summaryrefslogtreecommitdiff
path: root/src/base/addr_range_map.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/addr_range_map.hh')
-rw-r--r--src/base/addr_range_map.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/base/addr_range_map.hh b/src/base/addr_range_map.hh
index c35befdce..1992c5e48 100644
--- a/src/base/addr_range_map.hh
+++ b/src/base/addr_range_map.hh
@@ -73,7 +73,7 @@ class AddrRangeMap
i = tree.upper_bound(r);
if (i == tree.begin()) {
- if (i->first.start <= r.end && i->first.end >= r.start)
+ if (i->first.intersects(r))
return i;
else
// Nothing could match, so return end()
@@ -82,7 +82,7 @@ class AddrRangeMap
--i;
- if (i->first.start <= r.end && i->first.end >= r.start)
+ if (i->first.intersects(r))
return i;
return tree.end();
@@ -96,7 +96,7 @@ class AddrRangeMap
i = tree.upper_bound(r);
if (i == tree.begin()) {
- if (i->first.start <= r.end && i->first.end >= r.start)
+ if (i->first.intersects(r))
return i;
else
// Nothing could match, so return end()
@@ -105,7 +105,7 @@ class AddrRangeMap
--i;
- if (i->first.start <= r.end && i->first.end >= r.start)
+ if (i->first.intersects(r))
return i;
return tree.end();