| 1 |
From 4c61d2a68bdefd3b3270afede832caf1310ce577 Mon Sep 17 00:00:00 2001 |
| 2 |
From: Yuri Pieters <[email protected]> |
| 3 |
Date: Tue, 13 Dec 2022 17:57:52 +0000 |
| 4 |
Subject: Fix some assertion errors from calls to the logger |
| 5 |
|
| 6 |
--- |
| 7 |
code/apis/ProfileManager.cpp | 6 +++--- |
| 8 |
code/datastructures/FSOExecutable.cpp | 4 ++-- |
| 9 |
2 files changed, 5 insertions(+), 5 deletions(-) |
| 10 |
|
| 11 |
--- a/code/apis/ProfileManager.cpp |
| 12 |
+++ b/code/apis/ProfileManager.cpp |
| 13 |
@@ -135,9 +135,9 @@ |
| 14 |
// fetch all profiles. |
| 15 |
wxArrayString foundProfiles; |
| 16 |
wxDir::GetAllFiles(GetProfileStorageFolder(), &foundProfiles, wxT_2("pro?????.ini")); |
| 17 |
|
| 18 |
- wxLogInfo(wxT_2(" Found %d profile(s)."), foundProfiles.Count()); |
| 19 |
+ wxLogInfo(wxT_2(" Found %u profile(s)."), static_cast<unsigned>(foundProfiles.Count())); |
| 20 |
for( size_t i = 0; i < foundProfiles.Count(); i++) { |
| 21 |
wxLogDebug(wxT_2(" Opening %s"), foundProfiles[i].c_str()); |
| 22 |
wxFFileInputStream instream(foundProfiles[i]); |
| 23 |
wxFileConfig *config = new wxFileConfig(instream); |
| 24 |
@@ -1429,10 +1429,10 @@ |
| 25 |
|
| 26 |
wxLogDebug(_T("contents of dest config after clearing:")); |
| 27 |
LogConfigContents(*dest); |
| 28 |
|
| 29 |
- wxLogDebug(_T("after clearing, dest has %d entries and %d groups"), |
| 30 |
- dest->GetNumberOfEntries(true), dest->GetNumberOfGroups(true)); |
| 31 |
+ wxLogDebug(_T("after clearing, dest has %u entries and %u groups"), |
| 32 |
+ static_cast<unsigned>(dest->GetNumberOfEntries(true)), static_cast<unsigned>(dest->GetNumberOfGroups(true))); |
| 33 |
|
| 34 |
wxLogDebug(_T("recopying src to dest")); |
| 35 |
|
| 36 |
CopyConfig(src, *dest); |
| 37 |
--- a/code/datastructures/FSOExecutable.cpp |
| 38 |
+++ b/code/datastructures/FSOExecutable.cpp |
| 39 |
@@ -177,10 +177,10 @@ |
| 40 |
#endif |
| 41 |
|
| 42 |
if (!quiet) { |
| 43 |
wxString execType = globPattern.Lower().Find(_T("fred")) == wxNOT_FOUND ? _T("FS2") : _T("FRED2"); |
| 44 |
- wxLogInfo(_T(" Found %d %s Open executables in '%s'"), |
| 45 |
- files.GetCount(), execType.c_str(), path.GetPath().c_str()); |
| 46 |
+ wxLogInfo(_T(" Found %u %s Open executables in '%s'"), |
| 47 |
+ static_cast<unsigned>(files.GetCount()), execType.c_str(), path.GetPath().c_str()); |
| 48 |
|
| 49 |
for (size_t i = 0, n = files.GetCount(); i < n; ++i) { |
| 50 |
wxLogDebug(_T("Found executable: %s"), files.Item(i).c_str()); |
| 51 |
} |