X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2c4c39878247f4b7b09b79e29b90e0b718b0d296..da55d0644f1cc11b5c55de4fc18d039f69666e86:/src/common/xtistrm.cpp diff --git a/src/common/xtistrm.cpp b/src/common/xtistrm.cpp index ffdc588183..03d974f25e 100644 --- a/src/common/xtistrm.cpp +++ b/src/common/xtistrm.cpp @@ -162,22 +162,24 @@ void wxWriter::WriteAllProperties( const wxObject * obj , const wxClassInfo* ci } map.erase( name ) ; } - - for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter ) - { - const wxPropertyInfo* prop = iter->second ; - if ( prop->GetFlags() & wxPROP_OBJECT_GRAPH ) + { // Extra block for broken compilers + for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter ) { - WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ; + const wxPropertyInfo* prop = iter->second ; + if ( prop->GetFlags() & wxPROP_OBJECT_GRAPH ) + { + WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ; + } } } - - for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter ) - { - const wxPropertyInfo* prop = iter->second ; - if ( !(prop->GetFlags() & wxPROP_OBJECT_GRAPH) ) + { // Extra block for broken compilers + for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter ) { - WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ; + const wxPropertyInfo* prop = iter->second ; + if ( !(prop->GetFlags() & wxPROP_OBJECT_GRAPH) ) + { + WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ; + } } } } @@ -286,7 +288,7 @@ void wxWriter::WriteOneProperty( const wxObject *obj , const wxClassInfo* ci , c if ( value.GetAsString() == pi->GetDefaultValue().GetAsString() ) return ; } - + // avoid streaming out null objects const wxClassTypeInfo* cti = dynamic_cast< const wxClassTypeInfo* > ( pi->GetTypeInfo() ) ; @@ -580,7 +582,7 @@ void wxRuntimeDepersister::SetConnect(int eventSourceObjectID, handlerInfo->GetEventFunction() , NULL /*user data*/ , ehsink ) ; } - } + } } }