aboutsummaryrefslogtreecommitdiff
path: root/core/src/Entrypoint/main.cpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-05-06 21:56:40 -0700
committerrtk0c <[email protected]>2021-05-06 21:56:40 -0700
commit1fd1e4b5f2418e3ac2909658993bfedb615537ec (patch)
tree6de080d2273890f8a74d7fcd3572bb44f44ac545 /core/src/Entrypoint/main.cpp
parent538e804fc9beb83e711a210ffbb6badc15f285d5 (diff)
Change brace style to on new line, add initial deliveries view when an order entry is selected
Diffstat (limited to 'core/src/Entrypoint/main.cpp')
-rw-r--r--core/src/Entrypoint/main.cpp19
1 files changed, 14 insertions, 5 deletions
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<RenderingBackend> CreateDefaultBackend() {
+static std::unique_ptr<RenderingBackend> CreateDefaultBackend()
+{
#if PLATFORM_WIN32
# if BUILD_CORE_WITH_DX12_BACKEND
if (auto backend = RenderingBackend::CreateDx12Backend()) {
@@ -72,7 +73,8 @@ static std::unique_ptr<RenderingBackend> CreateDefaultBackend() {
return nullptr;
}
-static std::unique_ptr<RenderingBackend> CreateBackend(std::string_view option) {
+static std::unique_ptr<RenderingBackend> CreateBackend(std::string_view option)
+{
if (option == "default") {
return CreateDefaultBackend();
} else if (option == "opengl2") {
@@ -96,7 +98,8 @@ static std::unique_ptr<RenderingBackend> 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);