aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 16:37:02 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 16:37:02 +0200
commit4cb7ca42003c177e3acc80075d7594e555966106 (patch)
treed2f5836d70a1fa2dc1d18c4fb59f1bf1f2f91f5a /main.cpp
parentd8289105193707daede1a5b59137f18e20f20aeb (diff)
fix command design pattern
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index 9cc8ee8..d601165 100644
--- a/main.cpp
+++ b/main.cpp
@@ -12,7 +12,7 @@ int main(int argc, char** argv) {
View view { museum };
try {
- LoadFilesCommand(museum).execute(argc - 1, &argv[1]);
+ LoadFilesCommand(museum, argc - 1, &argv[1]).execute();
} catch (Exception & e) {
printf("%s\n", e.what());
return EXIT_FAILURE; // invalid files on start cause exit
@@ -20,8 +20,9 @@ int main(int argc, char** argv) {
// Museum and View both create their own worker threads, so the main thread
// should remain to keep the view active.
- while (view.open)
- ;
+ while (view.open) {
+ continue;
+ }
return EXIT_SUCCESS;
}