summaryrefslogtreecommitdiffstats
path: root/Source/cmCPluginAPI.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-09-03 15:30:00 (GMT)
committervvs31415 <vvs31415@users.noreply.github.com>2020-09-03 15:36:54 (GMT)
commit1380b4376408a1ec97bc23f521c067a83dc58680 (patch)
treee51d8351d2b61d08a6798fa3a71578c75fba458d /Source/cmCPluginAPI.cxx
parentca5babfd7a1da8e32f927ad086fdd91c2b09853b (diff)
downloadCMake-1380b4376408a1ec97bc23f521c067a83dc58680.zip
CMake-1380b4376408a1ec97bc23f521c067a83dc58680.tar.gz
CMake-1380b4376408a1ec97bc23f521c067a83dc58680.tar.bz2
Refactor: Use cmToCStr()
Diffstat (limited to 'Source/cmCPluginAPI.cxx')
-rw-r--r--Source/cmCPluginAPI.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 1a1bbec..ee2960b 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -581,13 +581,13 @@ 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 p ? p->c_str() : nullptr;
+ return cmToCStr(p);
}
if (!strcmp(prop, "LOCATION")) {
return sf->FullPath.c_str();
}
cmProp retVal = sf->Properties.GetPropertyValue(prop);
- return retVal ? retVal->c_str() : nullptr;
+ return cmToCStr(retVal);
}
int CCONV cmSourceFileGetPropertyAsBool(void* arg, const char* prop)