Codechange: Use format instead of to_string.

This commit is contained in:
frosch
2025-04-29 12:41:06 +02:00
committed by frosch
parent fda93b6f35
commit afe3dfb3a4
12 changed files with 38 additions and 40 deletions

View File

@@ -1627,7 +1627,7 @@ bool NetworkMakeClientNameUnique(std::string &name)
if (!is_name_unique) {
/* Try a new name (<name> #1, <name> #2, and so on) */
name = original_name + " #" + std::to_string(number);
name = fmt::format("{} #{}", original_name, number);
/* The constructed client name is larger than the limit,
* so... bail out as no valid name can be created. */