Codechange: use string/fmt instead of printf for ShowInfo(F)

This commit is contained in:
Rubidium
2023-04-18 19:41:29 +02:00
committed by rubidium42
parent 8f24901843
commit f5f6306af3
15 changed files with 35 additions and 49 deletions

View File

@@ -133,7 +133,7 @@ bool FiosIsHiddenFile(const struct dirent *ent)
return ent->d_name[0] == '.';
}
void ShowInfo(const char *str)
void ShowInfoI(const std::string &str)
{
HAB hab;
HMQ hmq;
@@ -143,7 +143,7 @@ void ShowInfo(const char *str)
hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0);
/* display the box */
rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, (const unsigned char *)str, (const unsigned char *)"OpenTTD", 0, MB_OK | MB_MOVEABLE | MB_INFORMATION);
rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, (const unsigned char *)str.c_str(), (const unsigned char *)"OpenTTD", 0, MB_OK | MB_MOVEABLE | MB_INFORMATION);
/* terminate PM env. */
WinDestroyMsgQueue(hmq);