From 4c61d2a68bdefd3b3270afede832caf1310ce577 Mon Sep 17 00:00:00 2001 From: Yuri Pieters Date: Tue, 13 Dec 2022 17:57:52 +0000 Subject: Fix some assertion errors from calls to the logger --- code/apis/ProfileManager.cpp | 6 +++--- code/datastructures/FSOExecutable.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) --- a/code/apis/ProfileManager.cpp +++ b/code/apis/ProfileManager.cpp @@ -135,9 +135,9 @@ // fetch all profiles. wxArrayString foundProfiles; wxDir::GetAllFiles(GetProfileStorageFolder(), &foundProfiles, wxT_2("pro?????.ini")); - wxLogInfo(wxT_2(" Found %d profile(s)."), foundProfiles.Count()); + wxLogInfo(wxT_2(" Found %u profile(s)."), static_cast(foundProfiles.Count())); for( size_t i = 0; i < foundProfiles.Count(); i++) { wxLogDebug(wxT_2(" Opening %s"), foundProfiles[i].c_str()); wxFFileInputStream instream(foundProfiles[i]); wxFileConfig *config = new wxFileConfig(instream); @@ -1429,10 +1429,10 @@ wxLogDebug(_T("contents of dest config after clearing:")); LogConfigContents(*dest); - wxLogDebug(_T("after clearing, dest has %d entries and %d groups"), - dest->GetNumberOfEntries(true), dest->GetNumberOfGroups(true)); + wxLogDebug(_T("after clearing, dest has %u entries and %u groups"), + static_cast(dest->GetNumberOfEntries(true)), static_cast(dest->GetNumberOfGroups(true))); wxLogDebug(_T("recopying src to dest")); CopyConfig(src, *dest); --- a/code/datastructures/FSOExecutable.cpp +++ b/code/datastructures/FSOExecutable.cpp @@ -177,10 +177,10 @@ #endif if (!quiet) { wxString execType = globPattern.Lower().Find(_T("fred")) == wxNOT_FOUND ? _T("FS2") : _T("FRED2"); - wxLogInfo(_T(" Found %d %s Open executables in '%s'"), - files.GetCount(), execType.c_str(), path.GetPath().c_str()); + wxLogInfo(_T(" Found %u %s Open executables in '%s'"), + static_cast(files.GetCount()), execType.c_str(), path.GetPath().c_str()); for (size_t i = 0, n = files.GetCount(); i < n; ++i) { wxLogDebug(_T("Found executable: %s"), files.Item(i).c_str()); }