Remove unneeded string copy

This commit is contained in:
Dmitry-Me 2019-11-19 10:19:13 +03:00
parent 4f1db90367
commit 55051b777b
1 changed files with 1 additions and 3 deletions

View File

@ -64,8 +64,7 @@ private:
if (i->first.find("memleak") != std::string::npos)
continue;
CLEAR_REDIRECT_ERROUT;
char* path = new char[i->first.size() + 1];
strcpy(path, i->first.c_str());
const char* const path = i->first.c_str();
const char * const argv[] = {
#ifdef _WIN32
".\\..\\testrunner",
@ -92,7 +91,6 @@ private:
actual.erase(actual.find("..\\"), 3); // Remove '..\'
ASSERT_EQUALS_MSG(expected, actual, i->first);
}
delete[] path;
}
}