diff options
author | Johannes Hofmann <devnull@localhost> | 2013-01-22 20:31:25 +0100 |
---|---|---|
committer | Johannes Hofmann <devnull@localhost> | 2013-01-22 20:31:25 +0100 |
commit | 6ee418dcdc1a162da26d5bd700c8ad5d7827ae77 (patch) | |
tree | 27d4ad8f9e15c9ab84667904a2664bc58723d3fe /lout | |
parent | 13948fd797d0148bf8ded2fba929c8a22bdd8615 (diff) |
Fixed a compiler warning in Pointer::hashValue().
Diffstat (limited to 'lout')
-rw-r--r-- | lout/object.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lout/object.cc b/lout/object.cc index 843c0ae4..85a908b9 100644 --- a/lout/object.cc +++ b/lout/object.cc @@ -21,6 +21,7 @@ #include "object.hh" #include <stdio.h> +#include <stdint.h> #include <config.h> namespace lout { @@ -132,7 +133,7 @@ int Pointer::hashValue() // Combine both parts of the pointer value *itself*, not what it // points to, by first referencing it (operator "&"), then // dereferencing it again (operator "[]"). - return ((int*)&value)[0] ^ ((int*)&value)[1]; + return ((intptr_t)value >> 32) ^ ((intptr_t)value); #endif } |