1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:44:58 +00:00

Add a CircularQueue template class to AK.

This commit is contained in:
Andreas Kling 2018-10-22 22:46:02 +02:00
parent b824f15619
commit c8b7173aa8
3 changed files with 96 additions and 2 deletions

View file

@ -8,12 +8,13 @@ static StringImpl* s_theEmptyStringImpl = nullptr;
void StringImpl::initializeGlobals()
{
s_theEmptyStringImpl = new StringImpl(ConstructTheEmptyStringImpl);;
s_theEmptyStringImpl = nullptr;
}
StringImpl& StringImpl::theEmptyStringImpl()
{
ASSERT(s_theEmptyStringImpl);
if (!s_theEmptyStringImpl)
s_theEmptyStringImpl = new StringImpl(ConstructTheEmptyStringImpl);;
return *s_theEmptyStringImpl;
}