summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-03-13 17:30:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-03-13 17:32:17 (GMT)
commit60f57d0dccb18bfcb37e6bd0c6496cc2e7996d14 (patch)
tree575fad8fdaf9dd42c0d88785a5aa6b361406fe80 /Source/cmVisualStudio10TargetGenerator.cxx
parent3766633b8a49cb24f4849721bb22a0feb9ba1f60 (diff)
downloadCMake-60f57d0dccb18bfcb37e6bd0c6496cc2e7996d14.zip
CMake-60f57d0dccb18bfcb37e6bd0c6496cc2e7996d14.tar.gz
CMake-60f57d0dccb18bfcb37e6bd0c6496cc2e7996d14.tar.bz2
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.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 121ff6e..6f5d813 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1017,7 +1017,7 @@ void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup(Elem& e0)
if (p.find(propNamePrefix) == 0) {
std::string tagName = p.substr(propNamePrefix.length());
if (!tagName.empty()) {
- std::string value = props.GetPropertyValue(p);
+ const std::string& value = *props.GetPropertyValue(p);
if (!value.empty()) {
e2.Element(tagName, value);
}
@@ -4802,7 +4802,7 @@ void cmVisualStudio10TargetGenerator::GetCSharpSourceProperties(
if (p.find(propNamePrefix) == 0) {
std::string tagName = p.substr(propNamePrefix.length());
if (!tagName.empty()) {
- const std::string val = props.GetPropertyValue(p);
+ const std::string& val = *props.GetPropertyValue(p);
if (!val.empty()) {
tags[tagName] = val;
} else {