Skip to content

Commit b1f5288

Browse files
authored
Merge pull request #5082 from tbrk/pointer-hashing
generic test of pointer size in model_cache
2 parents d41be91 + 546ed6a commit b1f5288

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ortools/constraint_solver/model_cache.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ inline uint64_t Hash1(int value) { return Hash1(static_cast<uint32_t>(value)); }
5151

5252
inline uint64_t Hash1(void* const ptr) {
5353
#if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || \
54-
defined(__aarch64__) || (defined(_MIPS_SZPTR) && (_MIPS_SZPTR == 64))
54+
defined(__aarch64__) || (defined(_MIPS_SZPTR) && (_MIPS_SZPTR == 64)) || \
55+
(defined(INTPTR_MAX) && defined(INT64_MAX) && (INTPTR_MAX == INT64_MAX))
5556
return Hash1(reinterpret_cast<uint64_t>(ptr));
5657
#else
5758
return Hash1(reinterpret_cast<uint32_t>(ptr));

0 commit comments

Comments
 (0)