From 4cb7ca42003c177e3acc80075d7594e555966106 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 18 Oct 2024 16:37:02 +0200 Subject: fix command design pattern --- main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'main.cpp') 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; } -- cgit v1.2.3