diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-18 16:37:02 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-18 16:37:02 +0200 |
commit | 4cb7ca42003c177e3acc80075d7594e555966106 (patch) | |
tree | d2f5836d70a1fa2dc1d18c4fb59f1bf1f2f91f5a /main.cpp | |
parent | d8289105193707daede1a5b59137f18e20f20aeb (diff) |
fix command design pattern
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; } |