From bf00f5287b2d0cc2dbd175ab25e7cafbda944f23 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 14 Nov 2014 00:03:28 +0100 Subject: QtAutogen: Don't take a reference to temporary. While a const reference to a temporary is standard conformant, it doesn't seem to be necessary or advantageous here. --- Source/cmQtAutoGenerators.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 929cbc0..3d6445d 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1500,7 +1500,7 @@ void cmQtAutoGenerators::Init() if (this->IncludeProjectDirsBefore) { - const std::string &binDir = "-I" + this->ProjectBinaryDir; + const std::string binDir = "-I" + this->ProjectBinaryDir; const std::string srcDir = "-I" + this->ProjectSourceDir; -- cgit v0.12 From 3bd59b6014c13a3f980b9988ebfca91e0a2936c0 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 14 Nov 2014 00:04:57 +0100 Subject: QtAutogen: Use cmHasLiteral{Prefix,Suffix} where possible. --- Source/cmQtAutoGenerators.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 3d6445d..f2ed016 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1479,7 +1479,7 @@ void cmQtAutoGenerators::Init() { const std::string &path = *it; this->MocIncludes.push_back("-I" + path); - if (this->EndsWith(path, ".framework/Headers")) + if (cmHasLiteralSuffix(path, ".framework/Headers")) { // Go up twice to get to the framework root std::vector pathComponents; @@ -1771,7 +1771,7 @@ void cmQtAutoGenerators::ParseCppFile(const std::string& absFilename, std::string basename = cmsys::SystemTools:: GetFilenameWithoutLastExtension(currentMoc); - const bool moc_style = this->StartsWith(basename, "moc_"); + const bool moc_style = cmHasLiteralPrefix(basename, "moc_"); // If the moc include is of the moc_foo.cpp style we expect // the Q_OBJECT class declaration in a header file. @@ -1953,7 +1953,7 @@ void cmQtAutoGenerators::StrictParseCppFile(const std::string& absFilename, std::string basename = cmsys::SystemTools:: GetFilenameWithoutLastExtension(currentMoc); - const bool mocUnderscoreStyle = this->StartsWith(basename, "moc_"); + const bool mocUnderscoreStyle = cmHasLiteralPrefix(basename, "moc_"); // If the moc include is of the moc_foo.cpp style we expect // the Q_OBJECT class declaration in a header file. -- cgit v0.12