aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/vfs_static.h
diff options
context:
space:
mode:
authorRodrigo Locatti <reinuseslisp@airmail.cc>2020-09-22 23:37:51 +0000
committerGitHub <noreply@github.com>2020-09-22 23:37:51 +0000
commit2b863c9aa34e388f6c64665a2e7d8c808d598c26 (patch)
tree288ff1cc4677d6511ed8cc7e1b0db20ce2d2590f /src/core/file_sys/vfs_static.h
parentc07fd2898b45032b5e4084fc49a19018ad099ba6 (diff)
parentff45c3957858cdf189b73e11550da06fe4337b8e (diff)
Merge pull request #4698 from lioncash/optional-null
General: Make use of std::nullopt where applicable
Diffstat (limited to 'src/core/file_sys/vfs_static.h')
-rw-r--r--src/core/file_sys/vfs_static.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/file_sys/vfs_static.h b/src/core/file_sys/vfs_static.h
index 9f5a90b1b..8b27c30fa 100644
--- a/src/core/file_sys/vfs_static.h
+++ b/src/core/file_sys/vfs_static.h
@@ -54,9 +54,11 @@ public:
}
std::optional<u8> ReadByte(std::size_t offset) const override {
- if (offset < size)
- return value;
- return {};
+ if (offset >= size) {
+ return std::nullopt;
+ }
+
+ return value;
}
std::vector<u8> ReadBytes(std::size_t length, std::size_t offset) const override {