summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinTool/ToolMain.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-06-17 04:44:09 +0200
committerGitHub <noreply@github.com>2023-06-17 04:44:09 +0200
commit5029924ba104fdc5bc78a804fb35cdb5d7418a8f (patch)
tree5806142c01fe21b8a28f95c89fb873592fbc2e41 /Source/Core/DolphinTool/ToolMain.cpp
parent1aef85a985a81d9e9419a14d92cdf4e497e2a0b4 (diff)
parent969eeb4b52bc5551c461f5dca42246a0661559cf (diff)
Merge pull request #11954 from Minty-Meeo/dolphin-tool-code-review-3
DolphinTool: Use EXIT_SUCCESS and EXIT_FAILURE
Diffstat (limited to 'Source/Core/DolphinTool/ToolMain.cpp')
-rw-r--r--Source/Core/DolphinTool/ToolMain.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/Core/DolphinTool/ToolMain.cpp b/Source/Core/DolphinTool/ToolMain.cpp
index 7dae146082..db6eb30c40 100644
--- a/Source/Core/DolphinTool/ToolMain.cpp
+++ b/Source/Core/DolphinTool/ToolMain.cpp
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include <cstdio>
+#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
@@ -16,12 +17,10 @@
#include "DolphinTool/HeaderCommand.h"
#include "DolphinTool/VerifyCommand.h"
-static int PrintUsage(int code)
+static void PrintUsage()
{
std::cerr << "usage: dolphin-tool COMMAND -h" << std::endl << std::endl;
std::cerr << "commands supported: [convert, verify, header]" << std::endl;
-
- return code;
}
#ifdef _WIN32
@@ -33,7 +32,10 @@ int main(int argc, char* argv[])
Core::DeclareAsHostThread();
if (argc < 2)
- return PrintUsage(1);
+ {
+ PrintUsage();
+ return EXIT_FAILURE;
+ }
const std::string_view command_str = argv[1];
// Take off the program name and command selector before passing arguments down
@@ -45,7 +47,8 @@ int main(int argc, char* argv[])
return DolphinTool::VerifyCommand(args);
else if (command_str == "header")
return DolphinTool::HeaderCommand(args);
- return PrintUsage(1);
+ PrintUsage();
+ return EXIT_FAILURE;
}
#ifdef _WIN32