Change font::len text argument from std::string to const char*

See the previous two commits, a lot of the time we don't need
std::string objects to be passed to these functions because we already
have C strings.

   Commit 1/3: font::print_wrap
   Commit 2/3: font::print
-> Commit 3/3: font::len
This commit is contained in:
Dav999-v
2023-03-05 00:32:58 +01:00
committed by Misa Elizabeth Kai
parent 5e3a4e69ce
commit d112dee72c
7 changed files with 11 additions and 12 deletions

View File

@@ -1497,7 +1497,7 @@ static void menurender(void)
int w[4] = {
font::len(0, str_par_time),
font::len(0, par_time),
font::len(0, par_time.c_str()),
font::len(0, str_best_rank),
font::len(PR_2X, rank)
};
@@ -2189,7 +2189,7 @@ void gamerender(void)
}
std::string time = game.timetstring(game.timetrialpar);
label_len = font::len(0, time);
label_len = font::len(0, time.c_str());
if(game.timetrialparlost)
{
font::print(PR_BOR | PR_RIGHT, 307-label_len-8, 214, loc::gettext("PAR TIME:"), 80, 80, 80);