From 4d8974f1fd3e5366e93464a7ab68a35777354886 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Wed, 15 Jan 2014 18:13:51 +0000 Subject: 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 --- src/pugixml.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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((reinterpret_cast(_memory) + (impl::xml_memory_page_alignment - 1)) & ~(impl::xml_memory_page_alignment - 1)); -- cgit v1.2.3