[apps] All apps are allocated in the same union

This commit is contained in:
Émilie Feral
2018-09-11 11:31:48 +02:00
parent 6d9f0c0f0b
commit 86b3d366ca
12 changed files with 15 additions and 11 deletions

View File

@@ -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

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {