From 142317782842751dba4e68f016f3c89c692dc5ac Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Thu, 10 Nov 2011 22:41:48 +0100 Subject: 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 --- Source/cmQtAutomoc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v0.12