Permalink
Browse files

Add a few more assertions.

  • Loading branch information...
jrfonseca committed Oct 10, 2012
1 parent 2473ca9 commit 40bd6eb7ee42ab10a3d0c78a4ad9b3170b94d666
Showing with 12 additions and 0 deletions.
  1. +12 −0 retrace/retrace_swizzle.cpp
@@ -75,6 +75,12 @@ lowerBound(unsigned long long address) {
}
}
+#ifndef NDEBUG
+ if (it != regionMap.end()) {
+ assert(contains(it, address) || it->first > address);
+ }
+#endif
+
return it;
}
@@ -83,6 +89,12 @@ static RegionMap::iterator
upperBound(unsigned long long address) {
RegionMap::iterator it = regionMap.upper_bound(address);
+#ifndef NDEBUG
+ if (it != regionMap.end()) {
+ assert(it->first >= address);
+ }
+#endif
+
return it;
}

0 comments on commit 40bd6eb

Please sign in to comment.