summaryrefslogtreecommitdiff
path: root/src/io.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2026-04-28 22:42:48 +0200
committerJoel Klinghed <the_jk@spawned.biz>2026-04-28 22:43:08 +0200
commit665bb6a5202ad0ca30e60bec338ca65853c1b131 (patch)
tree4d938a3f1bc3160ac065d9a437f2c1b6eb724864 /src/io.hh
parent2f43e9123dc406112d0802a82698cd124f42a794 (diff)
Make clang-tidy happy
Diffstat (limited to 'src/io.hh')
-rw-r--r--src/io.hh9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/io.hh b/src/io.hh
index 7c21028..edaa93e 100644
--- a/src/io.hh
+++ b/src/io.hh
@@ -8,14 +8,14 @@
namespace io {
-enum class ReadError {
+enum class ReadError : uint8_t {
Error,
Eof,
InvalidData, // invalid data read (not used by raw file)
MaxTooSmall, // max argument needs to be bigger (not used by raw file)
};
-enum class OpenError {
+enum class OpenError : uint8_t {
NoSuchFile,
NoAccess,
Error,
@@ -24,6 +24,8 @@ enum class OpenError {
class Reader {
public:
virtual ~Reader() = default;
+ Reader(Reader const&) = delete;
+ Reader& operator=(Reader const&) = delete;
[[nodiscard]] virtual std::expected<size_t, ReadError> read(void* dst,
size_t max) = 0;
@@ -35,9 +37,6 @@ class Reader {
protected:
Reader() = default;
-
- Reader(Reader const&) = delete;
- Reader& operator=(Reader const&) = delete;
};
[[nodiscard]] std::expected<std::unique_ptr<Reader>, OpenError> open(