From f313597968a5d1e07dbbb08ef82ebdbce4b40c51 Mon Sep 17 00:00:00 2001 From: Michael <13953785+Laserlicht@users.noreply.github.com> Date: Thu, 20 Jul 2023 22:02:39 +0200 Subject: [PATCH] Use boost::format --- client/lobby/SelectionTab.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/lobby/SelectionTab.cpp b/client/lobby/SelectionTab.cpp index 595a2765f..875023bba 100644 --- a/client/lobby/SelectionTab.cpp +++ b/client/lobby/SelectionTab.cpp @@ -332,10 +332,9 @@ void SelectionTab::showPopupWindow(const Point & cursorPosition) if(py >= curItems.size()) return; - std::string text = "{" + curItems[py]->getName() + "}\r\n\r\n"; - text += CGI->generaltexth->translate("vcmi.lobby.filename") + ":\r\n" + curItems[py]->fileURI; + std::string text = boost::str(boost::format("{%1%}\r\n\r\n%2%:\r\n%3%") % curItems[py]->getName() % CGI->generaltexth->translate("vcmi.lobby.filename") % curItems[py]->fileURI); if(curItems[py]->date != "") - text += "\r\n\r\n" + CGI->generaltexth->translate("vcmi.lobby.creationDate") + ":\r\n" + curItems[py]->date; + text += boost::str(boost::format("\r\n\r\n%1%:\r\n%2%") % CGI->generaltexth->translate("vcmi.lobby.creationDate") % curItems[py]->date); CRClickPopup::createAndPush(text); }