diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/file_sys/ivfc_archive.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/service/cfg/cfg.h | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/core/file_sys/ivfc_archive.cpp b/src/core/file_sys/ivfc_archive.cpp index e16aa1491..441ca9b53 100644 --- a/src/core/file_sys/ivfc_archive.cpp +++ b/src/core/file_sys/ivfc_archive.cpp @@ -62,7 +62,7 @@ std::unique_ptr<DirectoryBackend> IVFCArchive::OpenDirectory(const Path& path) c //////////////////////////////////////////////////////////////////////////////////////////////////// size_t IVFCFile::Read(const u64 offset, const size_t length, u8* buffer) const { - LOG_TRACE(Service_FS, "called offset=%llu, length=%d", offset, length); + LOG_TRACE(Service_FS, "called offset=%llu, length=%zu", offset, length); romfs_file->Seek(data_offset + offset, SEEK_SET); size_t read_length = (size_t)std::min((u64)length, data_size - offset); diff --git a/src/core/hle/service/cfg/cfg.h b/src/core/hle/service/cfg/cfg.h index 231528fd6..fc2a16a04 100644 --- a/src/core/hle/service/cfg/cfg.h +++ b/src/core/hle/service/cfg/cfg.h @@ -41,8 +41,9 @@ struct SaveConfigBlockEntry { u16 flags; ///< The flags of the block, possibly used for access control }; -// TODO(Link Mauve): use a constexpr once MSVC starts supporting it. -#define C(code) (u16)((code)[0] | ((code)[1] << 8)) +static constexpr u16 C(const char code[2]) { + return code[0] | (code[1] << 8); +} static const std::array<u16, 187> country_codes = {{ 0, C("JP"), 0, 0, 0, 0, 0, 0, // 0-7 @@ -71,8 +72,6 @@ static const std::array<u16, 187> country_codes = {{ C("SM"), C("VA"), C("BM") // 184-186 }}; -#undef C - /** * CFG::GetCountryCodeString service function * Inputs: |