mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
cmPropertyMap: Introduce cmProp as return type for GetProperty() functions
Currently properties are usually stored internally as `std::string`. However, family of GetProperty() functions return them as `const char *` using `c_str()`. The proposed `cmProp`, typedef'ed as `const std::string *` will expose properties more naturally.
This commit is contained in:
@@ -585,7 +585,8 @@ const char* CCONV cmSourceFileGetProperty(void* arg, const char* prop)
|
||||
if (!strcmp(prop, "LOCATION")) {
|
||||
return sf->FullPath.c_str();
|
||||
}
|
||||
return sf->Properties.GetPropertyValue(prop);
|
||||
cmProp retVal = sf->Properties.GetPropertyValue(prop);
|
||||
return retVal ? retVal->c_str() : nullptr;
|
||||
}
|
||||
|
||||
int CCONV cmSourceFileGetPropertyAsBool(void* arg, const char* prop)
|
||||
|
||||
Reference in New Issue
Block a user