mirror of https://github.com/OpenTTD/OpenTTD
(svn r17487) -Fix: silence some MSVC warnings
parent
f3f6eaa6dc
commit
a807026336
|
@ -77,8 +77,8 @@ Company::~Company()
|
||||||
*/
|
*/
|
||||||
void Company::PostDestructor(size_t index)
|
void Company::PostDestructor(size_t index)
|
||||||
{
|
{
|
||||||
InvalidateWindowData(WC_GRAPH_LEGEND, 0, index);
|
InvalidateWindowData(WC_GRAPH_LEGEND, 0, (int)index);
|
||||||
InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, index);
|
InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, (int)index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -481,7 +481,7 @@ static INT_PTR CALLBACK CrashDialogFunc(HWND wnd, UINT msg, WPARAM wParam, LPARA
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
|
||||||
/* Add path to crash.log and crash.dmp (if any) to the crash window text */
|
/* Add path to crash.log and crash.dmp (if any) to the crash window text */
|
||||||
int len = _tcslen(_crash_desc) + _tcslen(OTTD2FS(CrashLogWindows::current->crashlog_filename)) + _tcslen(OTTD2FS(CrashLogWindows::current->crashdump_filename)) + 4;
|
size_t len = _tcslen(_crash_desc) + _tcslen(OTTD2FS(CrashLogWindows::current->crashlog_filename)) + _tcslen(OTTD2FS(CrashLogWindows::current->crashdump_filename)) + 4;
|
||||||
TCHAR *text = AllocaM(TCHAR, len);
|
TCHAR *text = AllocaM(TCHAR, len);
|
||||||
TCHAR *dump = _tcsdup(OTTD2FS(CrashLogWindows::current->crashdump_filename));
|
TCHAR *dump = _tcsdup(OTTD2FS(CrashLogWindows::current->crashdump_filename));
|
||||||
_sntprintf(text, len, _crash_desc, OTTD2FS(CrashLogWindows::current->crashlog_filename), dump[0] != _T('\0') ? _T("'\n'") : _T(""), dump);
|
_sntprintf(text, len, _crash_desc, OTTD2FS(CrashLogWindows::current->crashlog_filename), dump[0] != _T('\0') ? _T("'\n'") : _T(""), dump);
|
||||||
|
@ -500,7 +500,7 @@ static INT_PTR CALLBACK CrashDialogFunc(HWND wnd, UINT msg, WPARAM wParam, LPARA
|
||||||
case 13: // Emergency save
|
case 13: // Emergency save
|
||||||
char filename[MAX_PATH];
|
char filename[MAX_PATH];
|
||||||
if (CrashLogWindows::current->WriteSavegame(filename, lastof(filename))) {
|
if (CrashLogWindows::current->WriteSavegame(filename, lastof(filename))) {
|
||||||
int len = _tcslen(_save_succeeded) + _tcslen(OTTD2FS(filename)) + 1;
|
size_t len = _tcslen(_save_succeeded) + _tcslen(OTTD2FS(filename)) + 1;
|
||||||
TCHAR *text = AllocaM(TCHAR, len);
|
TCHAR *text = AllocaM(TCHAR, len);
|
||||||
_sntprintf(text, len, _save_succeeded, OTTD2FS(filename));
|
_sntprintf(text, len, _save_succeeded, OTTD2FS(filename));
|
||||||
MessageBox(wnd, text, _T("Save successful"), MB_ICONINFORMATION);
|
MessageBox(wnd, text, _T("Save successful"), MB_ICONINFORMATION);
|
||||||
|
|
Loading…
Reference in New Issue