[Avida-SVN] r3492 - development/source/platform/tcmalloc-1.4

brysonda at myxo.css.msu.edu brysonda at myxo.css.msu.edu
Wed Oct 14 21:28:16 PDT 2009


Author: brysonda
Date: 2009-10-15 00:28:16 -0400 (Thu, 15 Oct 2009)
New Revision: 3492

Modified:
   development/source/platform/tcmalloc-1.4/packed-cache-inl.h
Log:
And yet a few more sign-comparison warnings when built via cmake (on Rodan).

Modified: development/source/platform/tcmalloc-1.4/packed-cache-inl.h
===================================================================
--- development/source/platform/tcmalloc-1.4/packed-cache-inl.h	2009-10-15 04:19:25 UTC (rev 3491)
+++ development/source/platform/tcmalloc-1.4/packed-cache-inl.h	2009-10-15 04:28:16 UTC (rev 3492)
@@ -149,13 +149,13 @@
 // 2^kKeybits and the values to be less than 2^kValuebits.  The size of
 // the table is controlled by kHashbits, and the type of each entry in
 // the cache is T.  See also the big comment at the top of the file.
-template <int kKeybits, typename T>
+template <unsigned int kKeybits, typename T>
 class PackedCache {
  public:
   typedef uintptr_t K;
   typedef size_t V;
-  static const int kHashbits = 12;
-  static const int kValuebits = 7;
+  static const unsigned int kHashbits = 12;
+  static const unsigned int kValuebits = 7;
   static const bool kUseWholeKeys = kKeybits + kValuebits <= 8 * sizeof(T);
 
   explicit PackedCache(V initial_value) {
@@ -230,8 +230,8 @@
         ((KeyToUpper(key) ^ entry) & kUpperMask) == 0;
   }
 
-  static const int kTbits = 8 * sizeof(T);
-  static const int kUpperbits = kUseWholeKeys ? kKeybits : kKeybits - kHashbits;
+  static const unsigned int kTbits = 8 * sizeof(T);
+  static const unsigned int kUpperbits = kUseWholeKeys ? kKeybits : kKeybits - kHashbits;
 
   // For masking a K.
   static const K kKeyMask = N_ONES_(K, kKeybits);




More information about the Avida-cvs mailing list