core: Remove unnecessary enum casts in log calls

Follows the video core PR. fmt doesn't require casts for enum classes
anymore, so we can remove quite a few casts.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
This commit is contained in:
FearlessTobi 2020-12-29 06:39:21 +01:00
parent 3f13e1cc24
commit da908a9ed1
36 changed files with 136 additions and 162 deletions

View file

@ -111,8 +111,7 @@ ResultVal<std::unique_ptr<FileBackend>> NCCHArchive::OpenFile(const Path& path,
std::unique_ptr<DelayGenerator> delay_generator = std::make_unique<ExeFSDelayGenerator>();
file = std::make_unique<NCCHFile>(std::move(buffer), std::move(delay_generator));
} else {
LOG_ERROR(Service_FS, "Unknown NCCH archive type {}!",
static_cast<u32>(openfile_path.filepath_type));
LOG_ERROR(Service_FS, "Unknown NCCH archive type {}!", openfile_path.filepath_type);
result = Loader::ResultStatus::Error;
}

View file

@ -27,7 +27,7 @@ namespace {
template <typename T>
ResultVal<std::tuple<MediaType, u64>> ParsePath(const Path& path, T program_id_reader) {
if (path.GetType() != LowPathType::Binary) {
LOG_ERROR(Service_FS, "Wrong path type {}", static_cast<int>(path.GetType()));
LOG_ERROR(Service_FS, "Wrong path type {}", path.GetType());
return ERROR_INVALID_PATH;
}
@ -42,7 +42,7 @@ ResultVal<std::tuple<MediaType, u64>> ParsePath(const Path& path, T program_id_r
auto media_type = static_cast<MediaType>(data[0]);
if (media_type != MediaType::SDMC && media_type != MediaType::GameCard) {
LOG_ERROR(Service_FS, "Unsupported media type {}", static_cast<u32>(media_type));
LOG_ERROR(Service_FS, "Unsupported media type {}", media_type);
// Note: this is strange, but the error code was verified with a real 3DS
return ERROR_UNSUPPORTED_OPEN_FLAGS;

View file

@ -133,7 +133,7 @@ public:
return OpenExeFS(filename);
}
default:
LOG_ERROR(Service_FS, "Unknown file type {}!", static_cast<u32>(file_path.type));
LOG_ERROR(Service_FS, "Unknown file type {}!", file_path.type);
return ERROR_INVALID_PATH;
}
}