refactor: ArgParser::assemble command use const ref std::string_view for ingoreArg
This commit is contained in:
@ -299,8 +299,9 @@ const char **ArgParser::getArgv(std::vector<std::string> &argsArray)
|
||||
return argv;
|
||||
}
|
||||
|
||||
std::string
|
||||
ArgParser::assembleCommand(std::vector<std::string> &argsArray, std::string ignoreArg, int parametersRequired)
|
||||
std::string ArgParser::assembleCommand(
|
||||
std::vector<std::string> &argsArray, const std::string_view &ignoreArg, int parametersRequired
|
||||
)
|
||||
{
|
||||
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 void removeDoubleQuotes(std::string_view &arg);
|
||||
static const char **getArgv(std::vector<std::string> &argsArray);
|
||||
static std::string
|
||||
assembleCommand(std::vector<std::string> &argsArray, std::string ignoreArg = "", int parametersRequired = 0);
|
||||
static std::string assembleCommand(
|
||||
std::vector<std::string> &argsArray, const std::string_view &ignoreArg = std::string_view(),
|
||||
int parametersRequired = 0
|
||||
);
|
||||
|
||||
static deskflow::ArgsBase &argsBase()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user