diff options
author | Andrea Weikert <elubie@gmx.net> | 2011-07-03 21:07:07 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2011-07-03 21:07:07 +0400 |
commit | 25ffeed8bf4fd47c4741615c8d8e2e77fe158ae3 (patch) | |
tree | d8fe0962d3c6f5ce11371ef3716e08f9cc7e8fc7 /source/blender/blenlib/BLI_smallhash.h | |
parent | d88ea6ab9128fdcda82beab2b4d38e27099c99e6 (diff) |
fixing compile errors with VisualStudio 2008.
* macro ABS has no effect with uintptr_t anyway and was throwing warning (promoted to error) -> commented out and marked with TODO
* removed two unused variables trhowing warning also promoted to error when compiling.
Diffstat (limited to 'source/blender/blenlib/BLI_smallhash.h')
-rwxr-xr-x | source/blender/blenlib/BLI_smallhash.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/blenlib/BLI_smallhash.h b/source/blender/blenlib/BLI_smallhash.h index 1c1cd2a0ed3..0301ce6976e 100755 --- a/source/blender/blenlib/BLI_smallhash.h +++ b/source/blender/blenlib/BLI_smallhash.h @@ -100,7 +100,7 @@ BM_INLINE void BLI_smallhash_insert(SmallHash *hash, uintptr_t key, void *item) { int h, hoff=1; - key = ABS(key); + /* key = ABS(key); TODO: XXXXX this throws error with MSVC (warning as error) */ if (hash->size < hash->used*3) { int newsize = hashsizes[++hash->curhash]; @@ -156,7 +156,7 @@ BM_INLINE void BLI_smallhash_remove(SmallHash *hash, uintptr_t key) { int h, hoff=1; - key = ABS(key); + /* key = ABS(key); TODO: XXXXX this throws error with MSVC (warning as error) */ h = key; while (hash->table[h % hash->size].key != key @@ -176,7 +176,7 @@ BM_INLINE void *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key) { int h, hoff=1; - key = ABS(key); + /* key = ABS(key); TODO: XXXXX this throws error with MSVC (warning as error) */ h = key; if (!hash->table) @@ -196,8 +196,9 @@ BM_INLINE void *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key) BM_INLINE int BLI_smallhash_haskey(SmallHash *hash, uintptr_t key) { - int h = ABS(key), hoff=1; - key = ABS(key); + int h = key, hoff=1; + h = ABS(h); + /* key = ABS(key); TODO: XXXXX this throws error with MSVC (warning as error) */ if (!hash->table) return 0; |