Add a CircularQueue template class to AK.

This commit is contained in:
Andreas Kling 2018-10-22 22:46:02 +02:00
commit c8b7173aa8
Notes: sideshowbarker 2024-07-19 18:45:03 +09:00
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;
}