]> git.cworth.org Git - apitrace/blobdiff - common/trace_fast_callset.cpp
Use skiplist-based FastCallSet within trace::CallSet
[apitrace] / common / trace_fast_callset.cpp
index d7c4edc15d5e4e171a44ee6e38e4f2fc6d1f5b56..3b5c570b088b4eac9c6d38ec0f630050242f92f4 100644 (file)
@@ -47,11 +47,17 @@ FastCallRange::FastCallRange(CallNo first, CallNo last, int level)
 }
 
 bool
-FastCallRange::contains(CallNo call_no)
+FastCallRange::contains(CallNo call_no) const
 {
     return (first <= call_no && last >= call_no);
 }
 
+bool
+FastCallSet::empty(void) const
+{
+    return max_level == 0;
+}
+
 FastCallSet::FastCallSet(): head(0, 0, MAX_LEVEL)
 {
     head.first = std::numeric_limits<CallNo>::max();
@@ -181,9 +187,9 @@ FastCallSet::add(CallNo call_no)
 }
 
 bool
-FastCallSet::contains(CallNo call_no)
+FastCallSet::contains(CallNo call_no) const
 {
-    FastCallRange *node;
+    const FastCallRange *node;
     int i;
 
     node = &head;