summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutomoc.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2011-11-10 21:41:48 (GMT)
committerAlex Neundorf <neundorf@kde.org>2011-11-10 21:41:48 (GMT)
commit142317782842751dba4e68f016f3c89c692dc5ac (patch)
tree187f2413076ad1d1e8bdcb270a7ced241624c71f /Source/cmQtAutomoc.cxx
parentf98e6151dc4d1bcc14373e423fcdd668f99ce07a (diff)
downloadCMake-142317782842751dba4e68f016f3c89c692dc5ac.zip
CMake-142317782842751dba4e68f016f3c89c692dc5ac.tar.gz
CMake-142317782842751dba4e68f016f3c89c692dc5ac.tar.bz2
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
Diffstat (limited to 'Source/cmQtAutomoc.cxx')
-rw-r--r--Source/cmQtAutomoc.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index 0714c84..343d51c 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -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