refactor: ArgParser::assemble command use const ref std::string_view for ingoreArg
This commit is contained in:
parent
e436b41ab0
commit
8dcd9b0c01
2 changed files with 7 additions and 4 deletions
|
|
@ -299,8 +299,9 @@ const char **ArgParser::getArgv(std::vector<std::string> &argsArray)
|
||||||
return argv;
|
return argv;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string
|
std::string ArgParser::assembleCommand(
|
||||||
ArgParser::assembleCommand(std::vector<std::string> &argsArray, std::string ignoreArg, int parametersRequired)
|
std::vector<std::string> &argsArray, const std::string_view &ignoreArg, int parametersRequired
|
||||||
|
)
|
||||||
{
|
{
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,10 @@ public:
|
||||||
static bool searchDoubleQuotes(const std::string_view &command, size_t &left, size_t &right, size_t startPos = 0);
|
static bool searchDoubleQuotes(const std::string_view &command, size_t &left, size_t &right, size_t startPos = 0);
|
||||||
static void removeDoubleQuotes(std::string_view &arg);
|
static void removeDoubleQuotes(std::string_view &arg);
|
||||||
static const char **getArgv(std::vector<std::string> &argsArray);
|
static const char **getArgv(std::vector<std::string> &argsArray);
|
||||||
static std::string
|
static std::string assembleCommand(
|
||||||
assembleCommand(std::vector<std::string> &argsArray, std::string ignoreArg = "", int parametersRequired = 0);
|
std::vector<std::string> &argsArray, const std::string_view &ignoreArg = std::string_view(),
|
||||||
|
int parametersRequired = 0
|
||||||
|
);
|
||||||
|
|
||||||
static deskflow::ArgsBase &argsBase()
|
static deskflow::ArgsBase &argsBase()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue