summaryrefslogtreecommitdiffstats
path: root/Source/cmOutputRequiredFilesCommand.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-16 20:45:24 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-16 20:45:24 (GMT)
commit516f8edb2e061749c56b6f9a58332fbf59e45a1a (patch)
tree82ebe3f38b5248ef0b78586019ac1dca44ce2370 /Source/cmOutputRequiredFilesCommand.cxx
parentd9f5d3c50fe376423382d6445f7fb2906a43469e (diff)
downloadCMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.zip
CMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.tar.gz
CMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.tar.bz2
Avoid else after return
Diffstat (limited to 'Source/cmOutputRequiredFilesCommand.cxx')
-rw-r--r--Source/cmOutputRequiredFilesCommand.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx
index ef636e7..730ce6d 100644
--- a/Source/cmOutputRequiredFilesCommand.cxx
+++ b/Source/cmOutputRequiredFilesCommand.cxx
@@ -307,10 +307,10 @@ protected:
// If dependencies are already done, stop now.
if (info->DependDone) {
return;
- } else {
- // Make sure we don't visit the same file more than once.
- info->DependDone = true;
}
+ // Make sure we don't visit the same file more than once.
+ info->DependDone = true;
+
const char* path = info->FullPath.c_str();
if (!path) {
cmSystemTools::Error(
@@ -405,15 +405,14 @@ protected:
if (result != this->DependInformationMap.end()) {
// Found an instance, return it.
return result->second;
- } else {
- // Didn't find an instance. Create a new one and save it.
- cmDependInformation* info = new cmDependInformation;
- info->FullPath = fullPath;
- info->PathOnly = cmSystemTools::GetFilenamePath(fullPath);
- info->IncludeName = file;
- this->DependInformationMap[fullPath] = info;
- return info;
}
+ // Didn't find an instance. Create a new one and save it.
+ cmDependInformation* info = new cmDependInformation;
+ info->FullPath = fullPath;
+ info->PathOnly = cmSystemTools::GetFilenamePath(fullPath);
+ info->IncludeName = file;
+ this->DependInformationMap[fullPath] = info;
+ return info;
}
/**