1
0
Fork 0

source/Platform/PlatformApplication: rename create() to get() and just return a statically allocated implementation.

As we just this throughout the whole program. and platform can be determined at compile time. we might as well allocate it statically.
This commit is contained in:
Henrik Hautakoski 2022-09-12 21:12:32 +02:00
parent 859e95eea8
commit c7d380c4b0
2 changed files with 4 additions and 3 deletions

View file

@ -13,9 +13,10 @@ typedef sp::UnixApplication ApplicationImpl;
namespace sp {
PlatformApplication* PlatformApplication::create()
PlatformApplication* PlatformApplication::get()
{
return new ApplicationImpl;
static ApplicationImpl inst;
return &inst;
}
} // namespace sp