aboutsummaryrefslogtreecommitdiff
path: root/src/FATStorage.cpp
diff options
context:
space:
mode:
authorJesse Talavera <jesse@jesse.tg>2023-12-12 05:07:22 -0500
committerGitHub <noreply@github.com>2023-12-12 11:07:22 +0100
commit9bfc9c08ffe88de4b54734d6fd03182c0a51e181 (patch)
tree28a9177f377f6ab85f9aabc54c3a523fd7d610ff /src/FATStorage.cpp
parent2cba2e783a2ef3a83b7d8bf0cb6e42a6298edbf6 (diff)
Sprinkle `const` around where appropriate (#1909)
* Sprinkle `const` around where appropriate - This will make it easier to use `NDS` objects in `const` contexts (e.g. `const` parameters or methods) * Remove the `const` qualifier on `DSi_DSP::DSPRead16` - MMIO reads can be non-pure, so this may not be `const` in the future
Diffstat (limited to 'src/FATStorage.cpp')
-rw-r--r--src/FATStorage.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/FATStorage.cpp b/src/FATStorage.cpp
index 8799cb4..2de42e8 100644
--- a/src/FATStorage.cpp
+++ b/src/FATStorage.cpp
@@ -145,12 +145,12 @@ bool FATStorage::InjectFile(const std::string& path, u8* data, u32 len)
}
-u32 FATStorage::ReadSectors(u32 start, u32 num, u8* data)
+u32 FATStorage::ReadSectors(u32 start, u32 num, u8* data) const
{
return ReadSectorsInternal(File, FileSize, start, num, data);
}
-u32 FATStorage::WriteSectors(u32 start, u32 num, u8* data)
+u32 FATStorage::WriteSectors(u32 start, u32 num, const u8* data)
{
if (ReadOnly) return 0;
return WriteSectorsInternal(File, FileSize, start, num, data);
@@ -947,7 +947,7 @@ bool FATStorage::ImportDirectory(const std::string& sourcedir)
return true;
}
-u64 FATStorage::GetDirectorySize(fs::path sourcedir)
+u64 FATStorage::GetDirectorySize(fs::path sourcedir) const
{
u64 ret = 0;
u32 csize = 0x1000; // this is an estimate