From fcd1876a21593bd62580383874b57c734d629a0c Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sat, 11 Oct 2014 01:35:24 -0700 Subject: Fix compact mode for 64-bit architectures --- src/pugixml.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/pugixml.cpp b/src/pugixml.cpp index f496b37..ccc8276 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -656,8 +656,8 @@ PUGI__NS_END #ifdef PUGIXML_COMPACT PUGI__NS_BEGIN - static const unsigned int compact_alignment_log2 = 2; - static const unsigned int compact_alignment = 1 << compact_alignment_log2; + static const uintptr_t compact_alignment_log2 = 2; + static const uintptr_t compact_alignment = 1 << compact_alignment_log2; class compact_header { @@ -672,12 +672,12 @@ PUGI__NS_BEGIN this->flags = static_cast(flags); } - void operator&=(unsigned int modflags) + void operator&=(uintptr_t modflags) { flags &= modflags; } - void operator|=(unsigned int modflags) + void operator|=(uintptr_t modflags) { flags |= modflags; } @@ -826,7 +826,7 @@ PUGI__NS_BEGIN operator T* const() const { - unsigned int data = _data0 + (_data1 << 8); + int data = _data0 + (_data1 << 8); if (data) { -- cgit v1.2.3