Show
Ignore:
Timestamp:
08/11/09 08:32:02 (15 years ago)
Author:
vbarta
Message:

fixed UIREGISTER

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/base/user_info.cpp

    r490 r493  
    6363 
    6464void UI::MappedUI::add_class ( const string &class_name, const type_info * const class_type_info, const UI* const ui ) { 
    65         pair< const string, const UI* const > new_pair = make_pair ( class_name, ui ); 
    66         mapped_strings().insert ( new_pair ); 
    67         mapped_type_infos().insert ( make_pair ( class_type_info, new_pair.first ) ); 
     65        pair< StringToUIMap::iterator, bool> inres = 
     66                mapped_strings().insert ( 
     67                        StringToUIMap::value_type( class_name, ui ) ); 
     68        if ( inres.second ) { 
     69                mapped_type_infos().insert ( 
     70                        TypeInfoToStringMap::value_type ( 
     71                                class_type_info, class_name ) ); 
     72        } 
    6873} 
    6974