It seems that boost_property has issues with reinterpret_cast. Not sure if boost breaks some standard rules in this section. Anyways, I use memcpy which just transfers the addresses of the pointers. Since Commander Genius needs that for savegames and configs, this fix is required.
This commit is contained in:
Submodule project/jni/application/commandergenius/commandergenius updated: 799859db33...8040189673
@@ -599,7 +599,11 @@ namespace boost { namespace property_tree { namespace detail {namespace rapidxml
|
|||||||
|
|
||||||
// Setup new pool in allocated memory
|
// Setup new pool in allocated memory
|
||||||
char *pool = align(raw_memory);
|
char *pool = align(raw_memory);
|
||||||
header *new_header = reinterpret_cast<header *>(pool);
|
|
||||||
|
header *new_header;
|
||||||
|
memcpy( (void*) new_header, (void*)pool,sizeof(header*));
|
||||||
|
|
||||||
|
//header *new_header = reinterpret_cast<header *>(pool);
|
||||||
new_header->previous_begin = m_begin;
|
new_header->previous_begin = m_begin;
|
||||||
m_begin = raw_memory;
|
m_begin = raw_memory;
|
||||||
m_ptr = pool + sizeof(header);
|
m_ptr = pool + sizeof(header);
|
||||||
|
|||||||
@@ -36,8 +36,14 @@ template<class T> struct addressof_impl
|
|||||||
{
|
{
|
||||||
static inline T * f( T & v, long )
|
static inline T * f( T & v, long )
|
||||||
{
|
{
|
||||||
return reinterpret_cast<T*>(
|
T* address;
|
||||||
&const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
|
|
||||||
|
memcpy( (void*) address, (void*)&v,sizeof(T*));
|
||||||
|
|
||||||
|
/*return reinterpret_cast<T*>(
|
||||||
|
&const_cast<char&>( reinterpret_cast<const volatile char &>(v) )
|
||||||
|
);*/
|
||||||
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline T * f( T * v, int )
|
static inline T * f( T * v, int )
|
||||||
|
|||||||
Submodule project/jni/boost/src updated: d3fa4e813c...5824acb451
Submodule project/jni/shmem updated: 89c7cb8d03...c2a28f528d
Reference in New Issue
Block a user