Kernel: panic takes arguments as rvalue references

This commit is contained in:
Bananymous 2023-10-30 16:17:26 +02:00
parent 4e785a133c
commit ce2461d0e8
1 changed files with 2 additions and 2 deletions

View File

@ -11,11 +11,11 @@ namespace Kernel::detail
template<typename... Args> template<typename... Args>
__attribute__((__noreturn__)) __attribute__((__noreturn__))
static void panic_impl(const char* file, int line, const char* message, Args... args) static void panic_impl(const char* file, int line, const char* message, Args&&... args)
{ {
asm volatile("cli"); asm volatile("cli");
derrorln("Kernel panic at {}:{}", file, line); derrorln("Kernel panic at {}:{}", file, line);
derrorln(message, args...); derrorln(message, BAN::forward<Args>(args)...);
if (!g_paniced) if (!g_paniced)
{ {
g_paniced = true; g_paniced = true;