aboutsummaryrefslogtreecommitdiff
path: root/gprofng/src/vec.h
diff options
context:
space:
mode:
Diffstat (limited to 'gprofng/src/vec.h')
-rw-r--r--gprofng/src/vec.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gprofng/src/vec.h b/gprofng/src/vec.h
index 04cce4e..a768a02 100644
--- a/gprofng/src/vec.h
+++ b/gprofng/src/vec.h
@@ -112,6 +112,13 @@ public:
return data[index];
}
+ void
+ truncate (long ncount)
+ {
+ if (count > ncount && ncount >= 0)
+ count = ncount;
+ }
+
// Return the first index in "this" that equals "item".
// Return -1 if "item" is not found.
long find (const ITEM item);