summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-07 18:13:35 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-10-07 18:13:35 (GMT)
commit6d98b15fc8b9a065325e3683afe94efce17dd162 (patch)
treeed8d70c9238c8af4f5d3ffc5041162bf78fc40a0 /Source/cmMakefile.cxx
parent869037ee86d1c0ab757840adf499ea270d4301e1 (diff)
downloadCMake-6d98b15fc8b9a065325e3683afe94efce17dd162.zip
CMake-6d98b15fc8b9a065325e3683afe94efce17dd162.tar.gz
CMake-6d98b15fc8b9a065325e3683afe94efce17dd162.tar.bz2
cmMakefile: Invert if() condition to remove else
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 57bab7a..7e26bff 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1249,13 +1249,13 @@ void cmMakefile::AddLinkDirectoryForTarget(const std::string& target,
const std::string& d)
{
cmTargets::iterator i = this->Targets.find(target);
- if (i != this->Targets.end()) {
- i->second.AddLinkDirectory(d);
- } else {
+ if (i == this->Targets.end()) {
cmSystemTools::Error(
"Attempt to add link directories to non-existent target: ",
target.c_str(), " for directory ", d.c_str());
+ return;
}
+ i->second.AddLinkDirectory(d);
}
void cmMakefile::InitializeFromParent(cmMakefile* parent)