2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-01-13 20:21:48 +00:00

chore: give all args to arg parser instead of omitting arg0

This commit is contained in:
Jan
2024-09-23 22:38:18 +02:00
parent 2b1c048a4a
commit 32480a75eb
7 changed files with 12 additions and 6 deletions

View File

@@ -33,8 +33,13 @@ bool ArgumentParser::ParseArguments(std::vector<std::string>& args)
m_matched_arguments.clear();
m_matched_options.clear();
if (args.empty())
return false;
m_path = args[0];
const auto argCount = args.size();
for (unsigned argIndex = 0; argIndex < argCount; argIndex++)
for (unsigned argIndex = 1u; argIndex < argCount; argIndex++)
{
auto& arg = args[argIndex];

View File

@@ -23,4 +23,5 @@ private:
std::vector<const CommandLineOption*> m_command_line_options;
std::map<const CommandLineOption*, std::vector<std::string>> m_matched_options;
std::vector<std::string> m_matched_arguments;
std::string m_path;
};