summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinTool/ToolMain.cpp
diff options
context:
space:
mode:
authorget <45425365+Minty-Meeo@users.noreply.github.com>2023-06-14 18:33:11 -0500
committerget <45425365+Minty-Meeo@users.noreply.github.com>2023-06-16 20:39:16 -0500
commit25c020cbe2b0f5fa0b384c64839fc16745af133c (patch)
tree34da80d0d5f139c9a786c8ac1a972e4429c78f44 /Source/Core/DolphinTool/ToolMain.cpp
parent98b5d72ef1415758db372f35942a19982cb27128 (diff)
DolphinTool: Ditch OOP design
Diffstat (limited to 'Source/Core/DolphinTool/ToolMain.cpp')
-rw-r--r--Source/Core/DolphinTool/ToolMain.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/Source/Core/DolphinTool/ToolMain.cpp b/Source/Core/DolphinTool/ToolMain.cpp
index b0e62cb594..7dae146082 100644
--- a/Source/Core/DolphinTool/ToolMain.cpp
+++ b/Source/Core/DolphinTool/ToolMain.cpp
@@ -8,9 +8,10 @@
#include <string_view>
#include <vector>
+#include "Common/StringUtil.h"
#include "Common/Version.h"
#include "Core/Core.h"
-#include "DolphinTool/Command.h"
+
#include "DolphinTool/ConvertCommand.h"
#include "DolphinTool/HeaderCommand.h"
#include "DolphinTool/VerifyCommand.h"
@@ -38,18 +39,13 @@ int main(int argc, char* argv[])
// Take off the program name and command selector before passing arguments down
const std::vector<std::string> args(argv + 2, argv + argc);
- std::unique_ptr<DolphinTool::Command> command;
-
if (command_str == "convert")
- command = std::make_unique<DolphinTool::ConvertCommand>();
+ return DolphinTool::ConvertCommand(args);
else if (command_str == "verify")
- command = std::make_unique<DolphinTool::VerifyCommand>();
+ return DolphinTool::VerifyCommand(args);
else if (command_str == "header")
- command = std::make_unique<DolphinTool::HeaderCommand>();
- else
- return PrintUsage(1);
-
- return command->Main(args);
+ return DolphinTool::HeaderCommand(args);
+ return PrintUsage(1);
}
#ifdef _WIN32