summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-08-27 14:02:05 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-08-27 14:02:05 +0200
commita230b7653866c81f502fdeb9656b2a39b13a0c43 (patch)
treeeb2d26aade2dec89e2f93a2744ff3f6dcb1c741e /editor
parented5bc88409ad1081167d2e9387422b2c350f3485 (diff)
editor/app: don't store it on the stack
It's almost 2 kilobytes.
Diffstat (limited to 'editor')
-rw-r--r--editor/app.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/editor/app.cpp b/editor/app.cpp
index fa1c9b76..e1e4af39 100644
--- a/editor/app.cpp
+++ b/editor/app.cpp
@@ -175,12 +175,13 @@ int app::run_from_argv(const int argc, const char* const* const argv)
opts.argv = argv;
opts.argc = argc;
- Pointer<floormat_main> ptr;
+ Pointer<struct floormat_main> main;
+ Pointer<struct app> app_ptr{new app{Utility::move(opts)}};
+ auto& app = *app_ptr;
{
- app application{Utility::move(opts)};
- ret = application.exec();
- ptr = Utility::move(application.M);
- (void)ptr;
+ ret = app.exec();
+ main = Utility::move(app.M);
+ (void)main;
}
loader_::destroy();
return ret;