BAN: MUST() now returns the underlying value

This commit is contained in:
Bananymous 2022-12-13 14:35:09 +02:00
parent b49a873d54
commit 19307ce197
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@
#if defined(__is_kernel) #if defined(__is_kernel)
#include <kernel/panic.h> #include <kernel/panic.h>
#define MUST(error) ({ auto e = error; if (e.IsError()) Kernel::panic("{}", e.GetError()); }) #define MUST(error) ({ auto e = error; if (e.IsError()) Kernel::panic("{}", e.GetError()); e.Value(); })
#else #else
#error "NOT IMPLEMENTED" #error "NOT IMPLEMENTED"
#endif #endif