diff --git a/trick_source/codegen/Interface_Code_Gen/ClassValues.cpp b/trick_source/codegen/Interface_Code_Gen/ClassValues.cpp index c62e453f..55f73eb8 100644 --- a/trick_source/codegen/Interface_Code_Gen/ClassValues.cpp +++ b/trick_source/codegen/Interface_Code_Gen/ClassValues.cpp @@ -57,6 +57,16 @@ void ClassValues::addInheritedFieldDescriptions(std::vector std::vector::iterator fdit ; // Loop through the incoming inherited variable names + for ( fdit = in_fdes.begin() ; fdit != in_fdes.end() ; fdit++ ) { + + (*fdit)->setBaseClassOffset( class_offset ) ; + (*fdit)->setInherited( true ) ; + (*fdit)->setVirtualInherited( virtual_inherited ) ; + // Adds the class offset to the field offset giving the total offset to the inherited variable + // The offset is stored in bits so multiply class_offset by 8. + (*fdit)->addOffset( class_offset * 8 ) ; + } + #ifdef __APPLE__ if ( !global_compat15 and !compat15 ) { #else @@ -64,13 +74,6 @@ void ClassValues::addInheritedFieldDescriptions(std::vector #endif for ( fdit = in_fdes.begin() ; fdit != in_fdes.end() ; fdit++ ) { - (*fdit)->setBaseClassOffset( class_offset ) ; - (*fdit)->setInherited( true ) ; - (*fdit)->setVirtualInherited( virtual_inherited ) ; - // Adds the class offset to the field offset giving the total offset to the inherited variable - // The offset is stored in bits so multiply class_offset by 8. - (*fdit)->addOffset( class_offset * 8 ) ; - std::string in_name = (*fdit)->getName() ; // search existing names for incoming inherited variable name. std::map< std::string , FieldDescription * >::iterator mit = field_name_to_info_map.find(in_name) ;