summaryrefslogtreecommitdiffstats
path: root/Source/cmCPluginAPI.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-11-05 16:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-11-05 16:07:39 (GMT)
commitf6e7d5f3a00eee04834840a9534d19445fd3ab8f (patch)
tree13f730473cd908d4d8f4673ff5ea78987385bf5a /Source/cmCPluginAPI.cxx
parentc43b0505a5806ce38274899cc09f42d3fd7d72ee (diff)
downloadCMake-f6e7d5f3a00eee04834840a9534d19445fd3ab8f.zip
CMake-f6e7d5f3a00eee04834840a9534d19445fd3ab8f.tar.gz
CMake-f6e7d5f3a00eee04834840a9534d19445fd3ab8f.tar.bz2
Reduce the scope of temporary cmProp variables and other improvements
Diffstat (limited to 'Source/cmCPluginAPI.cxx')
-rw-r--r--Source/cmCPluginAPI.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 8ebf6d2..968fa54 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -583,14 +583,12 @@ const char* CCONV cmSourceFileGetProperty(void* arg, const char* prop)
{
cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg);
if (cmSourceFile* rsf = sf->RealSourceFile) {
- cmProp p = rsf->GetProperty(prop);
- return cmToCStr(p);
+ return cmToCStr(rsf->GetProperty(prop));
}
if (!strcmp(prop, "LOCATION")) {
return sf->FullPath.c_str();
}
- cmProp retVal = sf->Properties.GetPropertyValue(prop);
- return cmToCStr(retVal);
+ return cmToCStr(sf->Properties.GetPropertyValue(prop));
}
int CCONV cmSourceFileGetPropertyAsBool(void* arg, const char* prop)