--- libs/test/src/unit_test_result.cpp.old 2003-04-24 16:45:52.000000000 +0200 +++ libs/test/src/unit_test_result.cpp 2003-04-24 16:50:33.000000000 +0200 @@ -476,27 +476,15 @@ void unit_test_result::report( std::string const& reportlevel, std::ostream& where_to_ ) { - struct my_pair { - c_string_literal level_name; - report_level level_value; - }; - - static const my_pair name_value_map[] = { - { "confirm" , CONFIRMATION_REPORT }, - { "short" , SHORT_REPORT }, - { "detailed" , DETAILED_REPORT }, - { "no" , NO_REPORT }, - }; - - static int const map_size = sizeof(name_value_map)/sizeof(my_pair); + static int const map_size = sizeof(report_level_names)/sizeof(c_string_literal); report_level rl = BAD_REPORT; if( reportlevel.empty() ) rl = CONFIRMATION_REPORT; else { - for( int i =0; i < map_size; i++ ) { - if( reportlevel == name_value_map[i].level_name ) { - rl = name_value_map[i].level_value; + for( int i = 0; i < map_size; i++ ) { + if( reportlevel == report_level_names[i] ) { + rl = (report_level)i; break; } }