summaryrefslogtreecommitdiff
path: root/src/bool-array.icc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2002-11-19 12:55:48 +0000
committerBruno Haible <bruno@clisp.org>2002-11-19 12:55:48 +0000
commit2cd11405ed0a30b01789466132fec6b6605ab25a (patch)
treef1becd5a17576864b7e7fe19c2402807b0510be0 /src/bool-array.icc
parent4cda19576bacc02b1ee7f6306ed5c935ac9ad828 (diff)
downloadgperf-2cd11405ed0a30b01789466132fec6b6605ab25a.tar.gz
Start using bool.
Diffstat (limited to 'src/bool-array.icc')
-rw-r--r--src/bool-array.icc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bool-array.icc b/src/bool-array.icc
index 6a41cdf..bc85076 100644
--- a/src/bool-array.icc
+++ b/src/bool-array.icc
@@ -38,18 +38,19 @@ Bool_Array::Bool_Array (unsigned int size)
_size, (unsigned int) (_size * sizeof (_storage_array[0])));
}
-/* Sets the specified bit to one. Returns its previous value (0 or 1). */
-INLINE int
+/* Sets the specified bit to true.
+ Returns its previous value (false or true). */
+INLINE bool
Bool_Array::set_bit (unsigned int index)
{
if (_storage_array[index] == _iteration_number)
/* The bit was set since the last clear() call. */
- return 1;
+ return true;
else
{
/* The last operation on this bit was clear(). Set it now. */
_storage_array[index] = _iteration_number;
- return 0;
+ return false;
}
}