Optimization: Removed unnecessary calls to simplifyPath(). The Caller should do this, and our callers (mainly the test suite) more or less do so, as they all supply just dummy paths ("test.cpp")

This commit is contained in:
PKEuS 2018-12-18 20:33:15 +01:00
parent b555572f9a
commit 34874dd94f
2 changed files with 2 additions and 2 deletions

View File

@ -1734,7 +1734,7 @@ bool Tokenizer::createTokens(std::istream &code,
// make sure settings specified
assert(mSettings);
return list.createTokens(code, Path::getRelativePath(Path::simplifyPath(FileName), mSettings->basePaths));
return list.createTokens(code, FileName);
}
void Tokenizer::createTokens(const simplecpp::TokenList *tokenList)

View File

@ -79,7 +79,7 @@ unsigned int TokenList::appendFileIfNew(const std::string &fileName)
return (unsigned int)i;
// The "mFiles" vector remembers what files have been tokenized..
mFiles.push_back(Path::simplifyPath(fileName));
mFiles.push_back(fileName);
// Update mIsC and mIsCpp properties
if (mFiles.size() == 1) { // Update only useful if first file added to _files