diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-09-16 20:45:24 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-09-16 20:45:24 (GMT) |
commit | 516f8edb2e061749c56b6f9a58332fbf59e45a1a (patch) | |
tree | 82ebe3f38b5248ef0b78586019ac1dca44ce2370 /Source/cmCPluginAPI.cxx | |
parent | d9f5d3c50fe376423382d6445f7fb2906a43469e (diff) | |
download | CMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.zip CMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.tar.gz CMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.tar.bz2 |
Avoid else after return
Diffstat (limited to 'Source/cmCPluginAPI.cxx')
-rw-r--r-- | Source/cmCPluginAPI.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index f97791a..3d7839b 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -524,9 +524,8 @@ void CCONV* cmGetSource(void* arg, const char* name) i = cmCPluginAPISourceFiles.insert(entry).first; } return (void*)i->second; - } else { - return CM_NULLPTR; } + return CM_NULLPTR; } void* CCONV cmAddSource(void* arg, void* arg2) @@ -574,12 +573,11 @@ const char* CCONV cmSourceFileGetProperty(void* arg, const char* prop) cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg); if (cmSourceFile* rsf = sf->RealSourceFile) { return rsf->GetProperty(prop); - } else { - if (!strcmp(prop, "LOCATION")) { - return sf->FullPath.c_str(); - } - return sf->Properties.GetPropertyValue(prop); } + if (!strcmp(prop, "LOCATION")) { + return sf->FullPath.c_str(); + } + return sf->Properties.GetPropertyValue(prop); } int CCONV cmSourceFileGetPropertyAsBool(void* arg, const char* prop) @@ -587,9 +585,8 @@ int CCONV cmSourceFileGetPropertyAsBool(void* arg, const char* prop) cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg); if (cmSourceFile* rsf = sf->RealSourceFile) { return rsf->GetPropertyAsBool(prop) ? 1 : 0; - } else { - return cmSystemTools::IsOn(cmSourceFileGetProperty(arg, prop)) ? 1 : 0; } + return cmSystemTools::IsOn(cmSourceFileGetProperty(arg, prop)) ? 1 : 0; } void CCONV cmSourceFileSetProperty(void* arg, const char* prop, |