fixed passedByValue warning hidden by suppression for false positive (#2974)

This commit is contained in:
Oliver Stöneberg 2020-12-24 20:09:11 +01:00 committed by GitHub
parent 7861aa00cf
commit 9d57b832b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1170,7 +1170,7 @@ bool CppCheckExecutor::tryLoadLibrary(Library& destination, const char* basepath
* Execute a shell command and read the output from it. Returns true if command terminated successfully. * Execute a shell command and read the output from it. Returns true if command terminated successfully.
*/ */
// cppcheck-suppress passedByValue // cppcheck-suppress passedByValue
bool CppCheckExecutor::executeCommand(std::string exe, std::vector<std::string> args, std::string redirect, std::string *output) bool CppCheckExecutor::executeCommand(std::string exe, std::vector<std::string> args, const std::string &redirect, std::string *output)
{ {
output->clear(); output->clear();

View File

@ -111,7 +111,7 @@ public:
/** /**
* Execute a shell command and read the output from it. Returns true if command terminated successfully. * Execute a shell command and read the output from it. Returns true if command terminated successfully.
*/ */
static bool executeCommand(std::string exe, std::vector<std::string> args, std::string redirect, std::string *output); static bool executeCommand(std::string exe, std::vector<std::string> args, const std::string &redirect, std::string *output);
protected: protected: