aboutsummaryrefslogtreecommitdiff
path: root/src/client/gameui.cpp
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2021-08-19 19:13:25 +0100
committerGitHub <noreply@github.com>2021-08-19 20:13:25 +0200
commit24b66dede00c8a5336adc6c1fafc837ee688c9ad (patch)
tree1d1ef1504646f6b39d918003de270c6ea58ebebc /src/client/gameui.cpp
parent3b842a7e021f61c119f060df5de035b71df1fe83 (diff)
downloaddragonfireclient-24b66dede00c8a5336adc6c1fafc837ee688c9ad.tar.xz
Add fwgettext util function
Diffstat (limited to 'src/client/gameui.cpp')
-rw-r--r--src/client/gameui.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp
index 323967550..028052fe6 100644
--- a/src/client/gameui.cpp
+++ b/src/client/gameui.cpp
@@ -299,12 +299,9 @@ void GameUI::toggleProfiler()
updateProfiler();
if (m_profiler_current_page != 0) {
- wchar_t buf[255];
- const wchar_t* str = wgettext("Profiler shown (page %d of %d)");
- swprintf(buf, sizeof(buf) / sizeof(wchar_t), str,
- m_profiler_current_page, m_profiler_max_page);
- delete[] str;
- showStatusText(buf);
+ std::wstring msg = fwgettext("Profiler shown (page %d of %d)",
+ m_profiler_current_page, m_profiler_max_page);
+ showStatusText(msg);
} else {
showTranslatedStatusText("Profiler hidden");
}