diff --git a/Core/Util/MemStick.cpp b/Core/Util/MemStick.cpp index 78192f8648..ceca99e9e3 100644 --- a/Core/Util/MemStick.cpp +++ b/Core/Util/MemStick.cpp @@ -46,7 +46,7 @@ bool SwitchMemstickFolderTo(Path newMemstickFolder) { #endif std::string str = newMemstickFolder.ToString(); - if (!File::WriteDataToFile(true, str.c_str(), (unsigned int)str.size(), memStickDirFile)) { + if (!File::WriteDataToFile(true, str.c_str(), str.size(), memStickDirFile)) { ERROR_LOG(SYSTEM, "Failed to write memstick path '%s' to '%s'", newMemstickFolder.c_str(), memStickDirFile.c_str()); // Not sure what to do if this file can't be written. Disk full? } @@ -208,7 +208,7 @@ MoveResult *MoveDirectoryContentsSafe(Path moveSrc, Path moveDest, MoveProgressR for (size_t i = 0; i < fileSuffixesToMove.size(); i++) { const auto &fileSuffix = fileSuffixesToMove[i]; progressReporter.SetProgress(StringFromFormat("%s (%s)", fileSuffix.suffix.c_str(), NiceSizeFormat(fileSuffix.fileSize).c_str()), - (int)i, (int)fileSuffixesToMove.size()); + i, fileSuffixesToMove.size()); Path from = moveSrc / fileSuffix.suffix; Path to = moveDest / fileSuffix.suffix; diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 7998a3343a..26bbccf1ae 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -354,10 +354,10 @@ void GameInfo::SetupTexture(Draw::DrawContext *thin3d, GameInfoTex &tex) { using namespace Draw; // TODO: Use TempImage to semi-load the image in the worker task, then here we // could just call CreateTextureFromTempImage. - tex.texture = CreateTextureFromFileData(thin3d, (const uint8_t *)tex.data.data(), (int)tex.data.size(), ImageFileType::DETECT, false, GetTitle().c_str()); + tex.texture = CreateTextureFromFileData(thin3d, (const uint8_t *)tex.data.data(), tex.data.size(), ImageFileType::DETECT, false, GetTitle().c_str()); tex.timeLoaded = time_now_d(); if (!tex.texture) { - ERROR_LOG(G3D, "Failed creating texture (%s) from %d-byte file", GetTitle().c_str(), (int)tex.data.size()); + ERROR_LOG(G3D, "Failed creating texture (%s) from %d-byte file", GetTitle().c_str(), tex.data.size()); } } diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index c8d8eaa7c2..5d2ba62883 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1509,7 +1509,7 @@ void GameSettingsScreen::CallbackMemstickFolder(bool yes) { } File::Delete(Path(testWriteFile)); - if (!File::WriteDataToFile(true, pendingMemstickFolder_.c_str(), (unsigned int)pendingMemstickFolder_.size(), memstickDirFile)) { + if (!File::WriteDataToFile(true, pendingMemstickFolder_.c_str(), pendingMemstickFolder_.size(), memstickDirFile)) { WARN_LOG(SYSTEM, "Failed to write memstick folder to '%s'", memstickDirFile.c_str()); } else { // Save so the settings, at least, are transferred. diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index d25c9d4936..692201f107 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -1533,7 +1533,7 @@ static Path GetSecretPath(const char *nameOfSecret) { // name should be simple alphanumerics to avoid problems on Windows. bool NativeSaveSecret(const char *nameOfSecret, const std::string &data) { Path path = GetSecretPath(nameOfSecret); - if (!File::WriteDataToFile(false, data.data(), (unsigned int)data.size(), path)) { + if (!File::WriteDataToFile(false, data.data(), data.size(), path)) { WARN_LOG(SYSTEM, "Failed to write secret '%s' to path '%s'", nameOfSecret, path.c_str()); return false; } diff --git a/UI/Store.cpp b/UI/Store.cpp index 4cd558227a..9dd2efc254 100644 --- a/UI/Store.cpp +++ b/UI/Store.cpp @@ -183,7 +183,7 @@ void HttpImageFileView::Draw(UIContext &dc) { } if (!textureData_.empty()) { - texture_ = CreateTextureFromFileData(dc.GetDrawContext(), (const uint8_t *)(textureData_.data()), (int)textureData_.size(), ImageFileType::DETECT, false, "store_icon"); + texture_ = CreateTextureFromFileData(dc.GetDrawContext(), (const uint8_t *)(textureData_.data()), textureData_.size(), ImageFileType::DETECT, false, "store_icon"); if (!texture_) textureFailed_ = true; textureData_.clear();