summaryrefslogtreecommitdiffhomepage
path: root/newBoot
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-09 09:34:28 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-09 09:34:28 +0100
commita8cf25e6b66425d89b25381bb07fd4074cdc8deb (patch)
treefc02c6c61a9d01b8e0ec1b0c1017587be9650a28 /newBoot
parentf719c5e4d825b11c510408612e3bdcd0f23a76c3 (diff)
mpt: add operator bool for FileType.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'newBoot')
-rw-r--r--newBoot/Source/MPT/FileType.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/newBoot/Source/MPT/FileType.hxx b/newBoot/Source/MPT/FileType.hxx
index 818d8197..4d7a5cf2 100644
--- a/newBoot/Source/MPT/FileType.hxx
+++ b/newBoot/Source/MPT/FileType.hxx
@@ -27,4 +27,10 @@ public:
FileType* Read(const char* path) { return _Manager::Read(path); }
FileType* Write(FileType* path) { return _Manager::Write(path); }
+ // little sanity test
+ operator bool()
+ {
+ return DiskError != 0 && DiskSize > 0;
+ }
+
}; \ No newline at end of file