GetSafeProperty: return std::string const&

This commit is contained in:
Vitaly Stakhovsky
2020-04-30 10:00:00 -04:00
committed by Brad King
parent c09efe074d
commit 53675adbcf
12 changed files with 36 additions and 28 deletions

View File

@@ -2670,7 +2670,8 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
std::string dest_file = to_file;
const std::string prefix = target->GetSafeProperty("PREFIX");
std::string const& prefix =
target->GetSafeProperty("PREFIX");
if (!prefix.empty()) {
dest_file =
cmStrCat(to_dir, prefix, *ReuseFrom, extension);