diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-07-02 15:54:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-02 09:54:01 -0400 |
commit | 043fb83d8febc9d277064d5b24e60832375a110f (patch) | |
tree | c61df0990f09ee56e0d636202d406d5cd0e9012e | |
parent | 10cb6e53ac9cc2536726445ab6782d22a74e71b8 (diff) | |
download | NorthstarLauncher-043fb83d8febc9d277064d5b24e60832375a110f.tar.gz NorthstarLauncher-043fb83d8febc9d277064d5b24e60832375a110f.zip |
Improve `ShouldLoadNorthstar()` logic readability (#499)
-rw-r--r-- | NorthstarLauncher/main.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/NorthstarLauncher/main.cpp b/NorthstarLauncher/main.cpp index dd3b68f5..9f641036 100644 --- a/NorthstarLauncher/main.cpp +++ b/NorthstarLauncher/main.cpp @@ -254,13 +254,9 @@ void PrependPath() bool ShouldLoadNorthstar(int argc, char* argv[]) { - bool loadNorthstar = true; for (int i = 0; i < argc; i++) if (!strcmp(argv[i], "-vanilla")) - loadNorthstar = false; - - if (!loadNorthstar) - return loadNorthstar; + return false; auto runNorthstarFile = std::ifstream("run_northstar.txt"); if (runNorthstarFile) @@ -269,9 +265,9 @@ bool ShouldLoadNorthstar(int argc, char* argv[]) runNorthstarFileBuffer << runNorthstarFile.rdbuf(); runNorthstarFile.close(); if (runNorthstarFileBuffer.str().starts_with("0")) - loadNorthstar = false; + return false; } - return loadNorthstar; + return true; } bool LoadNorthstar() |