summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-01-12 22:51:01 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-01-12 23:00:45 (GMT)
commitf24e1d37cef95145927d14d186e1615fca23a75b (patch)
tree1dcac2010b9534af53a4b418de6af487be6ccfae /Source/cmQtAutoGenerators.cxx
parentf27c5852b0d1e37fb27bd1da1e7295b5f1fc963d (diff)
downloadCMake-f24e1d37cef95145927d14d186e1615fca23a75b.zip
CMake-f24e1d37cef95145927d14d186e1615fca23a75b.tar.gz
CMake-f24e1d37cef95145927d14d186e1615fca23a75b.tar.bz2
Autogen: Generators: Fix clang-tidy readability-else-after-return
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r--Source/cmQtAutoGenerators.cxx10
1 files 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()) {