automoc: minor optimization

Handing th std::string instead the char* to the find()
reduces the time from 17 to 15 seconds (for a 1000 times loop of a
relatively small file), which is around 10 percent.

Alex
This commit is contained in:
Alex Neundorf 2011-11-10 22:41:48 +01:00
parent f98e6151dc
commit 1423177828
1 changed files with 1 additions and 1 deletions

View File

@ -527,7 +527,7 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
std::string ownMocHeaderFile;
std::string::size_type matchOffset = 0;
if (mocIncludeRegExp.find(contentsString.c_str()))
if (mocIncludeRegExp.find(contentsString))
{
// for every moc include in the file
do