Fix compact mode for 64-bit architectures

This commit is contained in:
Arseny Kapoulkine 2014-10-11 01:35:24 -07:00
parent 52371bf5fe
commit fcd1876a21

View File

@ -656,8 +656,8 @@ PUGI__NS_END
#ifdef PUGIXML_COMPACT #ifdef PUGIXML_COMPACT
PUGI__NS_BEGIN PUGI__NS_BEGIN
static const unsigned int compact_alignment_log2 = 2; static const uintptr_t compact_alignment_log2 = 2;
static const unsigned int compact_alignment = 1 << compact_alignment_log2; static const uintptr_t compact_alignment = 1 << compact_alignment_log2;
class compact_header class compact_header
{ {
@ -672,12 +672,12 @@ PUGI__NS_BEGIN
this->flags = static_cast<unsigned char>(flags); this->flags = static_cast<unsigned char>(flags);
} }
void operator&=(unsigned int modflags) void operator&=(uintptr_t modflags)
{ {
flags &= modflags; flags &= modflags;
} }
void operator|=(unsigned int modflags) void operator|=(uintptr_t modflags)
{ {
flags |= modflags; flags |= modflags;
} }
@ -826,7 +826,7 @@ PUGI__NS_BEGIN
operator T* const() const operator T* const() const
{ {
unsigned int data = _data0 + (_data1 << 8); int data = _data0 + (_data1 << 8);
if (data) if (data)
{ {