Advertisement
darkxst

define UINT32_MAX

Jan 25th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.15 KB | None | 0 0
  1. From 2148bc66047dcb77b2529da689d5139f87312f2c Mon Sep 17 00:00:00 2001
  2. From: Tim Lunn <tim@feathertop.org>
  3. Date: Sat, 26 Jan 2013 09:20:42 +1100
  4. Subject: [PATCH] add missing UINT32_MAX define
  5.  
  6. ---
  7. js/public/HashTable.h | 6 ++++--
  8.  1 file changed, 4 insertions(+), 2 deletions(-)
  9.  
  10. diff --git a/js/public/HashTable.h b/js/public/HashTable.h
  11. index 0e8d9bf..3982926 100644
  12. --- a/js/public/HashTable.h
  13. +++ b/js/public/HashTable.h
  14. @@ -11,6 +11,8 @@
  15.  #include "TemplateLib.h"
  16.  #include "Utility.h"
  17.  
  18. +#define JS_UINT32_MAX        4294967295U
  19. +
  20.  namespace js {
  21.  
  22.  class TempAllocPolicy;
  23. @@ -290,8 +292,8 @@ class HashTable : private AllocPolicy
  24.      {
  25.          /* Rely on compiler "constant overflow warnings". */
  26.          JS_STATIC_ASSERT(((sMaxInit * sInvMaxAlpha) >> 7) < sMaxCapacity);
  27. -        JS_STATIC_ASSERT((sMaxCapacity * sInvMaxAlpha) <= UINT32_MAX);
  28. -        JS_STATIC_ASSERT((sMaxCapacity * sizeof(Entry)) <= UINT32_MAX);
  29. +        JS_STATIC_ASSERT((sMaxCapacity * sInvMaxAlpha) <= JS_UINT32_MAX);
  30. +        JS_STATIC_ASSERT((sMaxCapacity * sizeof(Entry)) <= JS_UINT32_MAX);
  31.      }
  32.  
  33.      static bool isLiveHash(HashNumber hash)
  34. --
  35. 1.8.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement