From f24e1d37cef95145927d14d186e1615fca23a75b Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Thu, 12 Jan 2017 23:51:01 +0100 Subject: Autogen: Generators: Fix clang-tidy readability-else-after-return --- Source/cmQtAutoGenerators.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 2a038b9..06decf8 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -918,7 +918,11 @@ bool cmQtAutoGenerators::ParseContentForMoc( } } else { // Mode: Strict - if (basename != scannedFileBasename) { + if (basename == scannedFileBasename) { + // Include self + fileToMoc = absFilename; + ownDotMocIncluded = true; + } else { // Don't allow FOO.moc include other than self in strict mode std::ostringstream err; err << "AutoMoc: Error: " << absFilename << "\n" @@ -929,10 +933,6 @@ bool cmQtAutoGenerators::ParseContentForMoc( << ".moc\" to run moc on this source file.\n"; this->LogError(err.str()); return false; - } else { - // Include self - fileToMoc = absFilename; - ownDotMocIncluded = true; } } if (!fileToMoc.empty()) { -- cgit v0.12