mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] All apps are allocated in the same union
This commit is contained in:
@@ -23,6 +23,10 @@ private:
|
||||
~Apps() {};
|
||||
private:
|
||||
APPS_CONTAINER_APPS_DECLARATION
|
||||
Home::App m_homeApp;
|
||||
OnBoarding::App m_onBoardingApp;
|
||||
HardwareTest::App m_hardwareTestApp;
|
||||
USB::App m_usbApp;
|
||||
};
|
||||
Apps m_apps;
|
||||
APPS_CONTAINER_SNAPSHOT_DECLARATIONS
|
||||
|
||||
@@ -28,7 +28,7 @@ App::Snapshot::Snapshot() :
|
||||
}
|
||||
|
||||
App * App::Snapshot::unpack(Container * container) {
|
||||
return new App(container, this);
|
||||
return new (container->currentAppBuffer()) App(container, this);
|
||||
}
|
||||
|
||||
void App::Snapshot::reset() {
|
||||
|
||||
@@ -8,7 +8,7 @@ extern "C" {
|
||||
namespace HardwareTest {
|
||||
|
||||
App * App::Snapshot::unpack(Container * container) {
|
||||
return new App(container, this);
|
||||
return new (container->currentAppBuffer()) App(container, this);
|
||||
}
|
||||
|
||||
App::Descriptor * App::Snapshot::descriptor() {
|
||||
|
||||
@@ -17,7 +17,7 @@ I18n::Message App::Descriptor::upperName() {
|
||||
}
|
||||
|
||||
App * App::Snapshot::unpack(Container * container) {
|
||||
return new App(container, this);
|
||||
return new (container->currentAppBuffer()) App(container, this);
|
||||
}
|
||||
|
||||
App::Descriptor * App::Snapshot::descriptor() {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
namespace OnBoarding {
|
||||
|
||||
App * App::Snapshot::unpack(Container * container) {
|
||||
return new App(container, this);
|
||||
return new (container->currentAppBuffer()) App(container, this);
|
||||
}
|
||||
|
||||
App::Descriptor * App::Snapshot::descriptor() {
|
||||
|
||||
@@ -35,7 +35,7 @@ App::Snapshot::~Snapshot() {
|
||||
}
|
||||
|
||||
App * App::Snapshot::unpack(Container * container) {
|
||||
return new App(container, this);
|
||||
return new (container->currentAppBuffer()) App(container, this);
|
||||
}
|
||||
|
||||
App::Descriptor * App::Snapshot::descriptor() {
|
||||
|
||||
@@ -29,7 +29,7 @@ App::Snapshot::Snapshot() :
|
||||
}
|
||||
|
||||
App * App::Snapshot::unpack(Container * container) {
|
||||
return new App(container, this);
|
||||
return new (container->currentAppBuffer()) App(container, this);
|
||||
}
|
||||
|
||||
void App::Snapshot::reset() {
|
||||
|
||||
@@ -26,7 +26,7 @@ App::Snapshot::Snapshot() :
|
||||
}
|
||||
|
||||
App * App::Snapshot::unpack(Container * container) {
|
||||
return new App(container, this);
|
||||
return new (container->currentAppBuffer()) App(container, this);
|
||||
}
|
||||
|
||||
void App::Snapshot::reset() {
|
||||
|
||||
@@ -17,7 +17,7 @@ const Image * App::Descriptor::icon() {
|
||||
}
|
||||
|
||||
App * App::Snapshot::unpack(Container * container) {
|
||||
return new App(container, this);
|
||||
return new (container->currentAppBuffer()) App(container, this);
|
||||
}
|
||||
|
||||
App::Descriptor * App::Snapshot::descriptor() {
|
||||
|
||||
@@ -24,7 +24,7 @@ App::Snapshot::Snapshot() :
|
||||
}
|
||||
|
||||
App * App::Snapshot::unpack(Container * container) {
|
||||
return new App(container, this);
|
||||
return new (container->currentAppBuffer()) App(container, this);
|
||||
}
|
||||
|
||||
App::Descriptor * App::Snapshot::descriptor() {
|
||||
|
||||
@@ -31,7 +31,7 @@ App::Snapshot::Snapshot() :
|
||||
}
|
||||
|
||||
App * App::Snapshot::unpack(Container * container) {
|
||||
return new App(container, this);
|
||||
return new (container->currentAppBuffer()) App(container, this);
|
||||
}
|
||||
|
||||
void App::Snapshot::reset() {
|
||||
|
||||
@@ -13,7 +13,7 @@ I18n::Message App::Descriptor::upperName() {
|
||||
}
|
||||
|
||||
App * App::Snapshot::unpack(Container * container) {
|
||||
return new App(container, this);
|
||||
return new (container->currentAppBuffer()) App(container, this);
|
||||
}
|
||||
|
||||
App::Descriptor * App::Snapshot::descriptor() {
|
||||
|
||||
Reference in New Issue
Block a user