Codechange: replace text-buf printf with fmt::format

This commit is contained in:
Rubidium
2023-04-19 20:37:21 +02:00
committed by rubidium42
parent 173ed81dbe
commit 3105d0b09e
4 changed files with 6 additions and 20 deletions

View File

@@ -28,7 +28,6 @@
#include "table/strings.h"
#include <stdarg.h> /* va_list */
#include <deque>
#include "../safeguards.h"
@@ -429,9 +428,9 @@ struct NetworkChatWindow : public Window {
/* Change to the found name. Add ': ' if we are at the start of the line (pretty) */
if (pre_buf == tb_buf) {
this->message_editbox.text.Print("%s: ", cur_name);
this->message_editbox.text.Assign(fmt::format("{}: ", cur_name));
} else {
this->message_editbox.text.Print("%s %s", pre_buf, cur_name);
this->message_editbox.text.Assign(fmt::format("{} {}", pre_buf, cur_name));
}
this->SetDirty();