diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-11-21 16:03:10 +0100 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-11-21 16:03:18 +0100 |
| commit | ee8f9bbe865917566530eb22cdbce9ad2e7d28a9 (patch) | |
| tree | 9b1448d68b7559d5c938c37f4a719f80f6cdbe07 /dev/ZKAKit/KernelKit | |
| parent | 779b66cef292e1b52bce4599c9dfe1e0c10858eb (diff) | |
META: Fix previous commit.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKAKit/KernelKit')
| -rw-r--r-- | dev/ZKAKit/KernelKit/FileMgr.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/dev/ZKAKit/KernelKit/FileMgr.h b/dev/ZKAKit/KernelKit/FileMgr.h index 9b05fb09..fa9dec0c 100644 --- a/dev/ZKAKit/KernelKit/FileMgr.h +++ b/dev/ZKAKit/KernelKit/FileMgr.h @@ -356,7 +356,7 @@ namespace Kernel private: NodePtr fFile{nullptr}; - Int32 fFileRestrict{kFileMgrRestrictReadBinary | kFileMgrRestrictRead}; + Int32 fFileRestrict{kFileMgrRestrictReadBinary}; const Char* fMime{kFileMimeGeneric}; }; @@ -365,21 +365,21 @@ namespace Kernel typedef UInt64 CursorType; + inline static const auto kRestrictStrLen = 8U; + + /// @brief restrict information about the file descriptor. + struct FileRestrictKind final + { + Char fRestrict[kRestrictStrLen]; + Int32 fMappedTo; + }; + /// @brief constructor template <typename Encoding, typename Class> - FileStream<Encoding, Class>::FileStream(const Encoding* path, + inline FileStream<Encoding, Class>::FileStream(const Encoding* path, const Encoding* restrict_type) : fFile(Class::GetMounted()->Open(path, restrict_type)) { - static const auto kLength = 255U; - - /// @brief restrict information about the file descriptor. - struct FileRestrictKind final - { - Char fRestrict[kLength] = ""; - Int32 fMappedTo{0U}; - }; - const SizeT kRestrictCount = kRestrictMax; const FileRestrictKind kRestrictList[] = { { @@ -401,7 +401,7 @@ namespace Kernel { .fRestrict = kRestrictWB, .fMappedTo = kFileMgrRestrictReadWrite, - }}; + }}; for (SizeT index = 0; index < kRestrictCount; ++index) { @@ -418,7 +418,7 @@ namespace Kernel /// @brief destructor of the file stream. template <typename Encoding, typename Class> - FileStream<Encoding, Class>::~FileStream() + inline FileStream<Encoding, Class>::~FileStream() { mm_delete_heap(fFile); } |
