X-Git-Url: https://git.cworth.org/git?p=apitrace;a=blobdiff_plain;f=common%2Ftrace_fast_callset.cpp;h=3b5c570b088b4eac9c6d38ec0f630050242f92f4;hp=d7c4edc15d5e4e171a44ee6e38e4f2fc6d1f5b56;hb=570d8ccab67e230f61f9c79e4eaa6a1159bb6428;hpb=ec8f5a61f393e75e4c3e3e22f84c773af66810e9 diff --git a/common/trace_fast_callset.cpp b/common/trace_fast_callset.cpp index d7c4edc..3b5c570 100644 --- a/common/trace_fast_callset.cpp +++ b/common/trace_fast_callset.cpp @@ -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::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;