diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-14 17:56:13 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-14 17:56:13 +0100 |
commit | 181bf16539d425d4f07501905cc9326b434ce75e (patch) | |
tree | 00491e12245d3829a12b852c3bddbd140843ae0d /editor/app.cpp | |
parent | 10a0022f35e6bfccbbbf6fbd1538b9164cd569ff (diff) |
editor: factor out argv parsing code
Diffstat (limited to 'editor/app.cpp')
-rw-r--r-- | editor/app.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/app.cpp b/editor/app.cpp index b031d6f3..85bbba54 100644 --- a/editor/app.cpp +++ b/editor/app.cpp @@ -73,7 +73,7 @@ static int atoi_(const char* str) return negative ? result : -result; } -int app::run_from_argv(const int argc, const char* const* const argv) +fm_settings app::parse_cmdline(int argc, const char* const* argv) { fm_settings opts; Corrade::Utility::Arguments args{}; @@ -98,7 +98,12 @@ int app::run_from_argv(const int argc, const char* const* const argv) else opts.msaa_samples = (std::uint8_t)n; } + return opts; +} +int app::run_from_argv(const int argc, const char* const* const argv) +{ + auto opts = parse_cmdline(argc, argv); int ret; Pointer<floormat_main> ptr; { |