Changeset 916 for library/bdm

Show
Ignore:
Timestamp:
04/23/10 17:25:05 (14 years ago)
Author:
mido
Message:

small patch and adaptation of testsuite/logger_test.cpp

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/base/bdmbase.h

    r915 r916  
    308308        string store_id_and_give_name( enum T::log_level_enums const log_level_enum,  int enum_subindex, int id ) { 
    309309                int ids_len = ids(log_level_enum).length(); 
    310                 if( ids(log_level_enum).length() < enum_subindex ) 
    311                         ids(log_level_enum).set_size( enum_subindex ); 
     310                if( ids(log_level_enum).length() <= enum_subindex ) 
     311                        ids(log_level_enum).set_size( enum_subindex+1, true ); 
    312312                ids(log_level_enum)(enum_subindex) = id;  
    313313 
     
    322322 
    323323                // add number to name only in the case there are more registered vectors with the same log_level_enum 
    324                 if( ids_len > 0 ) 
    325                         stream << "[" << enum_subindex << "]"; 
     324                if( ids(log_level_enum).length() > 1 ) 
     325                        stream << "*" << enum_subindex; 
    326326                 
    327327                return stream.str();