[Avida-SVN] r3521 - development/source/tools

blwalker at myxo.css.msu.edu blwalker at myxo.css.msu.edu
Wed Nov 4 09:06:50 PST 2009


Author: blwalker
Date: 2009-11-04 12:06:49 -0500 (Wed, 04 Nov 2009)
New Revision: 3521

Modified:
   development/source/tools/cBitArray.h
Log:

Change a -1 to ~0 in cBitArray; the Intel compiler was complaining about assigning a negative number to an unsigned integer.  Which seems reasonable.

Unit tests pass.


Modified: development/source/tools/cBitArray.h
===================================================================
--- development/source/tools/cBitArray.h	2009-11-02 15:25:06 UTC (rev 3520)
+++ development/source/tools/cBitArray.h	2009-11-04 17:06:49 UTC (rev 3521)
@@ -120,7 +120,7 @@
   void Ones(const int num_bits) {
     const int num_fields = GetNumFields(num_bits);
     for (int i = 0; i < num_fields; i++) {
-      bit_fields[i] = -1;
+      bit_fields[i] = ~0;
     }    
     const int last_bit = GetFieldPos(num_bits);
     if (last_bit > 0) {




More information about the Avida-cvs mailing list