diff options
author | Bruno Haible <bruno@clisp.org> | 2002-11-19 12:55:48 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2002-11-19 12:55:48 +0000 |
commit | 2cd11405ed0a30b01789466132fec6b6605ab25a (patch) | |
tree | f1becd5a17576864b7e7fe19c2402807b0510be0 /src/bool-array.icc | |
parent | 4cda19576bacc02b1ee7f6306ed5c935ac9ad828 (diff) | |
download | gperf-2cd11405ed0a30b01789466132fec6b6605ab25a.tar.gz |
Start using bool.
Diffstat (limited to 'src/bool-array.icc')
-rw-r--r-- | src/bool-array.icc | 9 |
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; } } |