From d5a174a6d4f8be5e7cffe7c2adbb8db23b578f56 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Thu, 2 Jan 2025 18:49:56 -0600 Subject: Fixing errors in Vector. --- include/fud_file.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/fud_file.hpp') 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(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(flag)) != 0; } @@ -142,7 +142,7 @@ class RegularFile { Result size() const; - constexpr int fileDescriptor() const + [[nodiscard]] constexpr int fileDescriptor() const { return m_fd; } @@ -225,7 +225,7 @@ class BufferedRegularFile { Result searchSubstring(StringView subString); - constexpr const RegularFile& file() const + [[nodiscard]] constexpr const RegularFile& file() const { return m_file; } -- cgit v1.2.3