summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-01-15 18:13:51 +0000
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-01-15 18:13:51 +0000
commit4d8974f1fd3e5366e93464a7ab68a35777354886 (patch)
tree400b63f9a1d692150f10606d770ba1d065f85025
parent7f6b062e9f51c98e56713b1869c01573d7fe855f (diff)
Replace offsetof with sizeof since some compilers don't recognize offsetof as a compile-time constant expression
git-svn-id: http://pugixml.googlecode.com/svn/trunk@959 99668b35-9821-0410-8761-19e4c4f06640
-rw-r--r--src/pugixml.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index b637f27..848b4cb 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -5240,7 +5240,7 @@ namespace pugi
assert(!_root);
// initialize sentinel page
- PUGI__STATIC_ASSERT(offsetof(impl::xml_memory_page, data) + sizeof(impl::xml_document_struct) + impl::xml_memory_page_alignment <= sizeof(_memory));
+ PUGI__STATIC_ASSERT(sizeof(impl::xml_memory_page) + sizeof(impl::xml_document_struct) + impl::xml_memory_page_alignment <= sizeof(_memory));
// align upwards to page boundary
void* page_memory = reinterpret_cast<void*>((reinterpret_cast<uintptr_t>(_memory) + (impl::xml_memory_page_alignment - 1)) & ~(impl::xml_memory_page_alignment - 1));