@@ -549,15 +549,15 @@ void multi_level_download_do_frame()
549
549
unsigned bytes_received = operation.get_bytes_received ();
550
550
float bytes_per_sec = operation.get_bytes_per_sec ();
551
551
552
- auto level_name_str = std::string{ " Level name: " } + info.name ;
552
+ auto level_name_str = std::format ( " Level name: {} " , info.name ) ;
553
553
int str_w, str_h;
554
554
rf::gr::get_string_size (&str_w, &str_h, level_name_str.c_str (), -1 , medium_font);
555
555
int info_x = center_x - str_w / 2 ;
556
556
int info_spacing = medium_font_h * 3 / 2 ;
557
557
rf::gr::string (info_x, y, level_name_str.c_str (), medium_font);
558
558
y += info_spacing;
559
559
560
- auto created_by_str = std::string{ " Created by: " } + info.author ;
560
+ auto created_by_str = std::format ( " Created by: {} " , info.author ) ;
561
561
rf::gr::string (info_x, y, created_by_str.c_str (), medium_font);
562
562
y += info_spacing;
563
563
@@ -570,7 +570,7 @@ void multi_level_download_do_frame()
570
570
if (bytes_per_sec > 0 ) {
571
571
int remaining_size = info.size_in_bytes - bytes_received;
572
572
int secs_left = static_cast <int >(remaining_size / bytes_per_sec);
573
- auto time_left_str = std::to_string (secs_left) + " seconds left" ;
573
+ auto time_left_str = std::format ( " {} seconds left" , secs_left) ;
574
574
rf::gr::string (info_x, y, time_left_str.c_str (), medium_font);
575
575
}
576
576
0 commit comments