Browse Source

Util: Rename variable to plural

master
Riyyi 3 years ago
parent
commit
3f1ced53f6
  1. 6
      src/util/argparser.cpp
  2. 2
      src/util/argparser.h

6
src/util/argparser.cpp

@ -408,7 +408,7 @@ void ArgParser::addOption(double& value, char shortName, const char* longName, c
addOption(std::move(option));
}
void ArgParser::addOption(std::vector<std::string>& value, char shortName, const char* longName, const char* usageString, const char* manString, const char* argumentName, Required requiresArgument)
void ArgParser::addOption(std::vector<std::string>& values, char shortName, const char* longName, const char* usageString, const char* manString, const char* argumentName, Required requiresArgument)
{
Option option {
shortName,
@ -417,8 +417,8 @@ void ArgParser::addOption(std::vector<std::string>& value, char shortName, const
usageString,
manString,
requiresArgument,
[&value](const char* a) -> bool {
value.push_back(a);
[&values](const char* a) -> bool {
values.push_back(a);
return true;
}
};

2
src/util/argparser.h

@ -52,7 +52,7 @@ public:
void addOption(int& value, char shortName, const char* longName, const char* usageString, const char* manString, const char* argumentName = "", Required requiresArgument = Required::No);
void addOption(unsigned int& value, char shortName, const char* longName, const char* usageString, const char* manString, const char* argumentName = "", Required requiresArgument = Required::No);
void addOption(double& value, char shortName, const char* longName, const char* usageString, const char* manString, const char* argumentName = "", Required requiresArgument = Required::No);
void addOption(std::vector<std::string>& value, char shortName, const char* longName, const char* usageString, const char* manString, const char* argumentName = "", Required requiresArgument = Required::No);
void addOption(std::vector<std::string>& values, char shortName, const char* longName, const char* usageString, const char* manString, const char* argumentName = "", Required requiresArgument = Required::No);
void setErrorReporting(bool state) { m_errorReporting = state; }
void setExitOnFirstError(bool state) { m_exitOnFirstError = state; }

Loading…
Cancel
Save