From 7f72106639ed3caf6d6c408b407bb1f260faf31b Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 23 Mar 2016 00:55:42 -0400 Subject: [PATCH] Return a reference to Kernel from systemKernel() --- src/Kernel.cc | 4 ++-- src/Kernel.hh | 2 +- src/Main.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Kernel.cc b/src/Kernel.cc index 374b2be..c7241fa 100644 --- a/src/Kernel.cc +++ b/src/Kernel.cc @@ -21,10 +21,10 @@ namespace kernel { * Static */ -Kernel* +Kernel& Kernel::systemKernel() { - return &sKernel; + return sKernel; } /* diff --git a/src/Kernel.hh b/src/Kernel.hh index ec61866..38e1120 100644 --- a/src/Kernel.hh +++ b/src/Kernel.hh @@ -16,7 +16,7 @@ namespace kernel { struct Kernel { - static Kernel* systemKernel(); + static Kernel& systemKernel(); void panic(const char* msg, ...); diff --git a/src/Main.cc b/src/Main.cc index df55c55..e269584 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -75,5 +75,5 @@ kmain(multiboot::Information *information) interruptHandler.enableInterrupts(); console.printString("Interrupts enabled\n"); - kernel::Kernel::systemKernel()->halt(); + kernel::Kernel::systemKernel().halt(); }