diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-10-30 18:50:19 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-10-30 18:50:19 (GMT) |
commit | 5214bb354b508cafc859b4a05b4e5f8ed44767e0 (patch) | |
tree | fbf3447860426ec363b14e548b4fec709b6ea12d /Source/cmOutputRequiredFilesCommand.cxx | |
parent | 602b78aa79f6d99e775fa0a84fb441156d192833 (diff) | |
download | CMake-5214bb354b508cafc859b4a05b4e5f8ed44767e0.zip CMake-5214bb354b508cafc859b4a05b4e5f8ed44767e0.tar.gz CMake-5214bb354b508cafc859b4a05b4e5f8ed44767e0.tar.bz2 |
Avoid some copies
Diffstat (limited to 'Source/cmOutputRequiredFilesCommand.cxx')
-rw-r--r-- | Source/cmOutputRequiredFilesCommand.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx index f3aa79c..7a17f2c 100644 --- a/Source/cmOutputRequiredFilesCommand.cxx +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -180,26 +180,23 @@ protected: while (cmSystemTools::GetLineFromStream(fin, line)) { if (cmHasLiteralPrefix(line.c_str(), "#include")) { // if it is an include line then create a string class - std::string currentline = line; - size_t qstart = currentline.find('\"', 8); + size_t qstart = line.find('\"', 8); size_t qend; // if a quote is not found look for a < if (qstart == std::string::npos) { - qstart = currentline.find('<', 8); + qstart = line.find('<', 8); // if a < is not found then move on if (qstart == std::string::npos) { - cmSystemTools::Error("unknown include directive ", - currentline.c_str()); + cmSystemTools::Error("unknown include directive ", line.c_str()); continue; } else { - qend = currentline.find('>', qstart + 1); + qend = line.find('>', qstart + 1); } } else { - qend = currentline.find('\"', qstart + 1); + qend = line.find('\"', qstart + 1); } // extract the file being included - std::string includeFile = - currentline.substr(qstart + 1, qend - qstart - 1); + std::string includeFile = line.substr(qstart + 1, qend - qstart - 1); // see if the include matches the regular expression if (!this->IncludeFileRegularExpression.find(includeFile)) { if (this->Verbose) { |