There is not need to clear a string directly after its creation.
This commit is contained in:
parent
95b3d9eaa1
commit
8a45c3192b
|
@ -73,7 +73,7 @@ std::string Path::simplifyPath(std::string originalPath)
|
|||
originalPath = originalPath.erase(0, toErase);
|
||||
}
|
||||
|
||||
std::string subPath = "";
|
||||
std::string subPath;
|
||||
std::vector<std::string> pathParts;
|
||||
for (std::size_t i = 0; i < originalPath.size(); ++i) {
|
||||
if (originalPath[i] == '/' || originalPath[i] == '\\') {
|
||||
|
|
|
@ -278,7 +278,7 @@ void TestFixture::processOptions(const options& args)
|
|||
std::size_t TestFixture::runTests(const options& args)
|
||||
{
|
||||
std::string classname(args.which_test());
|
||||
std::string testname("");
|
||||
std::string testname;
|
||||
if (classname.find("::") != std::string::npos) {
|
||||
testname = classname.substr(classname.find("::") + 2);
|
||||
classname.erase(classname.find("::"));
|
||||
|
|
|
@ -8095,7 +8095,7 @@ private:
|
|||
// Preprocess file..
|
||||
Preprocessor preprocessor(settings0);
|
||||
std::list<std::string> configurations;
|
||||
std::string filedata = "";
|
||||
std::string filedata;
|
||||
std::istringstream fin(raw_code);
|
||||
preprocessor.preprocess(fin, filedata, configurations, emptyString, settings0.includePaths);
|
||||
const std::string code = preprocessor.getcode(filedata, emptyString, emptyString);
|
||||
|
|
Loading…
Reference in New Issue