From e9232199bdd97233dabd59f07c63607c93c0c59c Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 21 Mar 2021 16:53:07 +0200 Subject: Check multiboot2 header length, and if needed map the next page as well --- libk/result.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libk/result.h') diff --git a/libk/result.h b/libk/result.h index 8077baf..e940bd9 100644 --- a/libk/result.h +++ b/libk/result.h @@ -7,6 +7,7 @@ template class Result { public: + constexpr Result() = default; explicit constexpr Result(T t) : is_ok(true), data{.t = t} {}; explicit constexpr Result(E e) : is_ok(false), data{.e = e} {}; @@ -15,9 +16,9 @@ public: constexpr T value() const { return is_ok ? data.t : T{}; } private: - const bool is_ok; + const bool is_ok = false; union { T t; - E e; + E e = E::NoError; } data; }; -- cgit v1.2.1