diff --git a/src/ProfileManager/ProfileManager.cpp b/src/ProfileManager/ProfileManager.cpp index 9305684..5b584e2 100644 --- a/src/ProfileManager/ProfileManager.cpp +++ b/src/ProfileManager/ProfileManager.cpp @@ -117,7 +117,7 @@ auto ProfileManager::deleteProfile(std::size_t index, bool delete_builds) -> boo } if(delete_builds) { - for(std::uint8_t i = 0; i < 32; ++i) { + for(UnsignedByte i = 0; i < 32; ++i) { std::string filename = Utility::formatString("{}Unit{:.2d}{}.sav", _profiles.at(index).type() == ProfileType::Demo ? "Demo": "", i, _profiles.at(index).steamId()); @@ -170,7 +170,7 @@ auto ProfileManager::backupProfile(std::size_t index, bool backup_builds) -> boo zip_set_archive_comment(zip, comment.c_str(), comment.length()); if(backup_builds) { - for(std::uint8_t i = 0; i < 32; ++i) { + for(UnsignedByte i = 0; i < 32; ++i) { std::string build_filename = Utility::formatString("{}Unit{:.2d}{}.sav", _profiles.at(index).type() == ProfileType::Demo ? "Demo": "", i, _profiles.at(index).steamId()); @@ -267,7 +267,7 @@ void ProfileManager::refreshBackups() { backup.timestamp.minute = std::stoi(ts.at(4)); backup.timestamp.second = std::stoi(ts.at(5)); - std::int64_t num_entries = zip_get_num_entries(zip, ZIP_FL_UNCHANGED); + Long num_entries = zip_get_num_entries(zip, ZIP_FL_UNCHANGED); if(num_entries == 0) { continue; @@ -275,7 +275,7 @@ void ProfileManager::refreshBackups() { backup.includedFiles.reserve(num_entries); - for(std::int64_t i = 0; i < num_entries; i++) { + for(Long i = 0; i < num_entries; i++) { backup.includedFiles.emplace_back(zip_get_name(zip, i, ZIP_FL_UNCHANGED)); } @@ -331,7 +331,7 @@ auto ProfileManager::restoreBackup(std::size_t index) -> bool { Containers::StaticArray<8192, char> buf{ValueInit}; - std::int64_t bytes_read = 0; + Long bytes_read = 0; while((bytes_read = zip_fread(zf, buf.data(), buf.size())) > 0) { if(std::fwrite(buf.data(), sizeof(char), bytes_read, out) < static_cast(bytes_read)) { _lastError = Utility::formatString(error_format, file, "not enough bytes written.");