diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2025-01-02 18:49:56 -0600 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2025-01-02 18:49:56 -0600 |
commit | d5a174a6d4f8be5e7cffe7c2adbb8db23b578f56 (patch) | |
tree | 536a10802f418e3e71f3828597439537d9e62f21 /include/fud_file.hpp | |
parent | 908fdf06b41f9084d719a4b517c868b1ad29a9ac (diff) |
Fixing errors in Vector.
Diffstat (limited to 'include/fud_file.hpp')
-rw-r--r-- | include/fud_file.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/fud_file.hpp b/include/fud_file.hpp index 6f1acbf..66719e4 100644 --- a/include/fud_file.hpp +++ b/include/fud_file.hpp @@ -38,7 +38,7 @@ enum class FileAccessMode : uint8_t ReadWrite = Read | Write }; -enum class OpenFlagEnum : uint16_t +enum class OpenFlagEnum : uint8_t { Append = 0x01, Truncate = Append << 1, @@ -91,7 +91,7 @@ class OpenFlags { return mode; } - constexpr uint32_t flags() const noexcept + [[nodiscard]] constexpr uint32_t flags() const noexcept { uint32_t openFlags = 0; openFlags |= static_cast<uint32_t>(hasFlag(OpenFlagEnum::Append)) * O_APPEND; @@ -105,7 +105,7 @@ class OpenFlags { return openFlags; } - constexpr bool hasFlag(OpenFlagEnum flag) const noexcept + [[nodiscard]] constexpr bool hasFlag(OpenFlagEnum flag) const noexcept { return (m_mask & static_cast<FlagType>(flag)) != 0; } @@ -142,7 +142,7 @@ class RegularFile { Result<size_t, FudStatus> size() const; - constexpr int fileDescriptor() const + [[nodiscard]] constexpr int fileDescriptor() const { return m_fd; } @@ -225,7 +225,7 @@ class BufferedRegularFile { Result<size_t, FudStatus> searchSubstring(StringView subString); - constexpr const RegularFile& file() const + [[nodiscard]] constexpr const RegularFile& file() const { return m_file; } |