summaryrefslogtreecommitdiff
path: root/Kernel/KResult.h
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/KResult.h')
-rw-r--r--Kernel/KResult.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Kernel/KResult.h b/Kernel/KResult.h
index b6988f1364..aaafe7d052 100644
--- a/Kernel/KResult.h
+++ b/Kernel/KResult.h
@@ -172,8 +172,10 @@ public:
}
private:
- alignas(T) char m_storage[sizeof(T)];
- KResult m_error;
+ union {
+ alignas(T) char m_storage[sizeof(T)];
+ KResult m_error;
+ };
bool m_is_error { false };
bool m_have_storage { false };
};