X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2c4c39878247f4b7b09b79e29b90e0b718b0d296..93c2f401e9955dc37df1f8dbfea7881c676b8ddb:/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 ) ; } - } + } } }