Remove unneeded string copy
This commit is contained in:
parent
4f1db90367
commit
55051b777b
|
@ -64,8 +64,7 @@ private:
|
||||||
if (i->first.find("memleak") != std::string::npos)
|
if (i->first.find("memleak") != std::string::npos)
|
||||||
continue;
|
continue;
|
||||||
CLEAR_REDIRECT_ERROUT;
|
CLEAR_REDIRECT_ERROUT;
|
||||||
char* path = new char[i->first.size() + 1];
|
const char* const path = i->first.c_str();
|
||||||
strcpy(path, i->first.c_str());
|
|
||||||
const char * const argv[] = {
|
const char * const argv[] = {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
".\\..\\testrunner",
|
".\\..\\testrunner",
|
||||||
|
@ -92,7 +91,6 @@ private:
|
||||||
actual.erase(actual.find("..\\"), 3); // Remove '..\'
|
actual.erase(actual.find("..\\"), 3); // Remove '..\'
|
||||||
ASSERT_EQUALS_MSG(expected, actual, i->first);
|
ASSERT_EQUALS_MSG(expected, actual, i->first);
|
||||||
}
|
}
|
||||||
delete[] path;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue