diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2025-05-16 14:49:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-16 14:49:05 -0500 |
| commit | 7804c16dbb00d9460dfa6f5ff35e7dfa66d6cdf0 (patch) | |
| tree | fb174e445bbd63e01838e9e4a97c0bfee1f92774 /Source | |
| parent | 3b3bf6a04c4f2e3431b2cd321dfa35c9a49844a2 (diff) | |
| parent | 9dfcbcecff93a3419e09a9bfbb61f91f6f0bbf98 (diff) | |
Merge pull request #13531 from tygyh/DiscIO-Make-functions-constant
DiscIO: Make functions constant
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/DiscIO/DirectoryBlob.h | 2 | ||||
| -rw-r--r-- | Source/Core/DiscIO/NANDImporter.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DiscIO/NANDImporter.h | 2 | ||||
| -rw-r--r-- | Source/Core/DiscIO/NFSBlob.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DiscIO/NFSBlob.h | 2 | ||||
| -rw-r--r-- | Source/Core/DiscIO/RiivolutionPatcher.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DiscIO/RiivolutionPatcher.h | 3 | ||||
| -rw-r--r-- | Source/Core/DiscIO/WbfsBlob.h | 2 |
8 files changed, 9 insertions, 8 deletions
diff --git a/Source/Core/DiscIO/DirectoryBlob.h b/Source/Core/DiscIO/DirectoryBlob.h index d5b5c42545..12d546f909 100644 --- a/Source/Core/DiscIO/DirectoryBlob.h +++ b/Source/Core/DiscIO/DirectoryBlob.h @@ -307,7 +307,7 @@ private: void SetPartitions(std::vector<PartitionWithType>&& partitions); void SetPartitionHeader(DirectoryBlobPartition* partition, u64 partition_address); - VolumeDisc* GetWrappedVolume() { return m_wrapped_volume.get(); } + const VolumeDisc* GetWrappedVolume() const { return m_wrapped_volume.get(); } // For GameCube: DirectoryBlobPartition m_gamecube_pseudopartition; diff --git a/Source/Core/DiscIO/NANDImporter.cpp b/Source/Core/DiscIO/NANDImporter.cpp index ccba4aff48..f7e233579c 100644 --- a/Source/Core/DiscIO/NANDImporter.cpp +++ b/Source/Core/DiscIO/NANDImporter.cpp @@ -168,7 +168,7 @@ void NANDImporter::ProcessEntry(u16 entry_number, const std::string& parent_path } } -std::vector<u8> NANDImporter::GetEntryData(const NANDFSTEntry& entry) +std::vector<u8> NANDImporter::GetEntryData(const NANDFSTEntry& entry) const { constexpr size_t NAND_FAT_BLOCK_SIZE = 0x4000; diff --git a/Source/Core/DiscIO/NANDImporter.h b/Source/Core/DiscIO/NANDImporter.h index 9b4260620f..164d009f5a 100644 --- a/Source/Core/DiscIO/NANDImporter.h +++ b/Source/Core/DiscIO/NANDImporter.h @@ -70,7 +70,7 @@ private: std::string GetPath(const NANDFSTEntry& entry, const std::string& parent_path); std::string FormatDebugString(const NANDFSTEntry& entry); void ProcessEntry(u16 entry_number, const std::string& parent_path); - std::vector<u8> GetEntryData(const NANDFSTEntry& entry); + std::vector<u8> GetEntryData(const NANDFSTEntry& entry) const; void ExportKeys(); std::string m_nand_root; diff --git a/Source/Core/DiscIO/NFSBlob.cpp b/Source/Core/DiscIO/NFSBlob.cpp index 4b33596802..f051ec9832 100644 --- a/Source/Core/DiscIO/NFSBlob.cpp +++ b/Source/Core/DiscIO/NFSBlob.cpp @@ -184,7 +184,7 @@ u64 NFSFileReader::GetRawSize() const return m_raw_size; } -u64 NFSFileReader::ToPhysicalBlockIndex(u64 logical_block_index) +u64 NFSFileReader::ToPhysicalBlockIndex(u64 logical_block_index) const { u64 physical_blocks_so_far = 0; diff --git a/Source/Core/DiscIO/NFSBlob.h b/Source/Core/DiscIO/NFSBlob.h index 80f9312614..cdcd20011f 100644 --- a/Source/Core/DiscIO/NFSBlob.h +++ b/Source/Core/DiscIO/NFSBlob.h @@ -73,7 +73,7 @@ private: NFSFileReader(std::vector<NFSLBARange> lba_ranges, std::vector<File::IOFile> files, Key key, u64 raw_size); - u64 ToPhysicalBlockIndex(u64 logical_block_index); + u64 ToPhysicalBlockIndex(u64 logical_block_index) const; bool ReadEncryptedBlock(u64 physical_block_index); void DecryptBlock(u64 logical_block_index); bool ReadAndDecryptBlock(u64 logical_block_index); diff --git a/Source/Core/DiscIO/RiivolutionPatcher.cpp b/Source/Core/DiscIO/RiivolutionPatcher.cpp index a5093f586a..c7bf51f3d0 100644 --- a/Source/Core/DiscIO/RiivolutionPatcher.cpp +++ b/Source/Core/DiscIO/RiivolutionPatcher.cpp @@ -57,7 +57,7 @@ FileDataLoaderHostFS::FileDataLoaderHostFS(std::string sd_root, const std::strin } std::optional<std::string> -FileDataLoaderHostFS::MakeAbsoluteFromRelative(std::string_view external_relative_path) +FileDataLoaderHostFS::MakeAbsoluteFromRelative(std::string_view external_relative_path) const { #ifdef _WIN32 // Riivolution treats a backslash as just a standard filename character, but we can't replicate diff --git a/Source/Core/DiscIO/RiivolutionPatcher.h b/Source/Core/DiscIO/RiivolutionPatcher.h index 9ddcb765b3..cac6462970 100644 --- a/Source/Core/DiscIO/RiivolutionPatcher.h +++ b/Source/Core/DiscIO/RiivolutionPatcher.h @@ -65,7 +65,8 @@ public: ResolveSavegameRedirectPath(std::string_view external_relative_path) override; private: - std::optional<std::string> MakeAbsoluteFromRelative(std::string_view external_relative_path); + std::optional<std::string> + MakeAbsoluteFromRelative(std::string_view external_relative_path) const; std::string m_sd_root; std::string m_patch_root; diff --git a/Source/Core/DiscIO/WbfsBlob.h b/Source/Core/DiscIO/WbfsBlob.h index aa4e07b1a8..29bc48e85f 100644 --- a/Source/Core/DiscIO/WbfsBlob.h +++ b/Source/Core/DiscIO/WbfsBlob.h @@ -44,7 +44,7 @@ private: bool ReadHeader(); File::IOFile& SeekToCluster(u64 offset, u64* available); - bool IsGood() { return m_good; } + bool IsGood() const { return m_good; } struct FileEntry { FileEntry(File::IOFile file_, u64 base_address_, u64 size_) |
