From 1fd1e4b5f2418e3ac2909658993bfedb615537ec Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 6 May 2021 21:56:40 -0700 Subject: Change brace style to on new line, add initial deliveries view when an order entry is selected --- core/src/Entrypoint/main.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'core/src/Entrypoint/main.cpp') diff --git a/core/src/Entrypoint/main.cpp b/core/src/Entrypoint/main.cpp index 8f9832c..2d0238e 100644 --- a/core/src/Entrypoint/main.cpp +++ b/core/src/Entrypoint/main.cpp @@ -21,7 +21,8 @@ namespace fs = std::filesystem; using namespace std::literals::string_literals; using namespace std::literals::string_view_literals; -static std::unique_ptr CreateDefaultBackend() { +static std::unique_ptr CreateDefaultBackend() +{ #if PLATFORM_WIN32 # if BUILD_CORE_WITH_DX12_BACKEND if (auto backend = RenderingBackend::CreateDx12Backend()) { @@ -72,7 +73,8 @@ static std::unique_ptr CreateDefaultBackend() { return nullptr; } -static std::unique_ptr CreateBackend(std::string_view option) { +static std::unique_ptr CreateBackend(std::string_view option) +{ if (option == "default") { return CreateDefaultBackend(); } else if (option == "opengl2") { @@ -96,7 +98,8 @@ static std::unique_ptr CreateBackend(std::string_view option) } } -int main(int argc, char* argv[]) { +int main(int argc, char* argv[]) +{ argparse::ArgumentParser parser; parser.add_argument("--global-data-directory") .help("Directory in which global data (such as recently used projects) are saved to. Use 'default' to use the default directory on each platform.") @@ -159,10 +162,16 @@ int main(int argc, char* argv[]) { GlobalStates::Init(); } } - DEFER { GlobalStates::Shutdown(); }; + DEFER + { + GlobalStates::Shutdown(); + }; UIState::Init(); - DEFER { UIState::Shutdown(); }; + DEFER + { + UIState::Shutdown(); + }; // Main loop backend->RunUntilWindowClose(&UI::MainWindow); -- cgit v1.2.3-70-g09d2