diff options
author | Bruno Haible <bruno@clisp.org> | 2002-11-09 01:12:49 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2002-11-09 01:12:49 +0000 |
commit | 34da28c8ab95e15d278a541d543ee17257612543 (patch) | |
tree | e3b2c845c985ce9e8ff1bf94f8e6ebfef95b9cad /src/bool-array.icc | |
parent | 643c2cab823756c6ad7c42997b6588eff8a28db9 (diff) | |
download | gperf-34da28c8ab95e15d278a541d543ee17257612543.tar.gz |
Prefix all field names with _.
Diffstat (limited to 'src/bool-array.icc')
-rw-r--r-- | src/bool-array.icc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/bool-array.icc b/src/bool-array.icc index 24987a2..35eef84 100644 --- a/src/bool-array.icc +++ b/src/bool-array.icc @@ -27,25 +27,25 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Initializes the bit array with room for s bits, numbered from 0 to s-1. */ INLINE Bool_Array::Bool_Array (unsigned int s) - : size (s), iteration_number (1), storage_array (new unsigned int [s]) + : _size (s), _iteration_number (1), _storage_array (new unsigned int [s]) { - memset (storage_array, 0, s * sizeof (unsigned int)); + memset (_storage_array, 0, s * sizeof (unsigned int)); if (option[DEBUG]) fprintf (stderr, "\nbool array size = %d, total bytes = %d\n", - size, (unsigned int) (size * sizeof (*storage_array))); + _size, (unsigned int) (_size * sizeof (*_storage_array))); } /* Sets the specified bit to one. Returns its previous value (0 or 1). */ INLINE int Bool_Array::set_bit (unsigned int index) { - if (storage_array[index] == iteration_number) + if (_storage_array[index] == _iteration_number) /* The bit was set since the last clear() call. */ return 1; else { /* The last operation on this bit was clear(). Set it now. */ - storage_array[index] = iteration_number; + _storage_array[index] = _iteration_number; return 0; } } @@ -58,10 +58,10 @@ Bool_Array::clear () occurs once about every 2^32 iterations, so it will not happen more frequently than once per second. */ - if (++iteration_number == 0) + if (++_iteration_number == 0) { - iteration_number = 1; - memset (storage_array, 0, size * sizeof (unsigned int)); + _iteration_number = 1; + memset (_storage_array, 0, _size * sizeof (unsigned int)); if (option[DEBUG]) { fprintf (stderr, "(re-initialized bool_array)\n"); |