Changeset 916
- Timestamp:
- 04/23/10 17:25:05 (15 years ago)
- Location:
- library
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/bdmbase.h
r915 r916 308 308 string store_id_and_give_name( enum T::log_level_enums const log_level_enum, int enum_subindex, int id ) { 309 309 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 ); 312 312 ids(log_level_enum)(enum_subindex) = id; 313 313 … … 322 322 323 323 // 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; 326 326 327 327 return stream.str(); -
library/tests/testsuite/logger_test.cpp
r907 r916 53 53 L.add_vector( log_level, logr, r, prefix ); 54 54 L.add_vector( log_level, logth, th, prefix ); 55 L.add_setting( log_level, logpol, prefix ); 55 L.add_setting( log_level, logpol, prefix, 0 ); 56 L.add_setting( log_level, logpol, prefix, 1 ); 56 57 } 57 58 … … 60 61 log_level.store( logr, vec_2 ( ( double ) i, ( double ) ( i + 1 ) ) ); 61 62 log_level.store( logth, vec_2 ( ( double ) ( 100 - i ), ( double ) ( i - 50 ) ) ); 62 log_level.store( logpol, pol ); 63 log_level.store( logpol, pol, 0 ); 64 log_level.store( logpol, pol^2, 1 ); 63 65 } 64 66