1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

Kernel: Switch singletons to use new Singleton class

Fixes #3226
This commit is contained in:
Tom 2020-08-20 09:36:06 -06:00 committed by Andreas Kling
parent 527c8047fe
commit f48feae0b2
Notes: sideshowbarker 2024-07-19 03:23:13 +09:00
44 changed files with 184 additions and 146 deletions

View file

@ -26,21 +26,25 @@
#include "NullDevice.h"
#include <AK/StdLibExtras.h>
#include <Kernel/Singleton.h>
namespace Kernel {
static NullDevice* s_the;
static auto s_the = make_singleton<NullDevice>();
void NullDevice::initialize()
{
s_the.ensure_instance();
}
NullDevice& NullDevice::the()
{
ASSERT(s_the);
return *s_the;
}
NullDevice::NullDevice()
: CharacterDevice(1, 3)
{
s_the = this;
}
NullDevice::~NullDevice()