diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-01-29 17:40:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-29 19:31:01 (GMT) |
commit | bbc07e456193a90562635d7baa1f82c4dc0bd1cb (patch) | |
tree | e9862bfdc1f87c06678efc8dabd31a7e72142789 /Source/cmTargetPropertyComputer.h | |
parent | feea34e7eb483e8db28947920757612a95ab1863 (diff) | |
download | CMake-bbc07e456193a90562635d7baa1f82c4dc0bd1cb.zip CMake-bbc07e456193a90562635d7baa1f82c4dc0bd1cb.tar.gz CMake-bbc07e456193a90562635d7baa1f82c4dc0bd1cb.tar.bz2 |
Source: use std::string in place of const char*
Diffstat (limited to 'Source/cmTargetPropertyComputer.h')
-rw-r--r-- | Source/cmTargetPropertyComputer.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index 3b11acd..df34f18 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -46,10 +46,10 @@ private: cmListFileBacktrace const& context); template <typename Target> - static const char* ComputeLocationForBuild(Target const* tgt); + static const std::string& ComputeLocationForBuild(Target const* tgt); template <typename Target> - static const char* ComputeLocation(Target const* tgt, - std::string const& config); + static const std::string& ComputeLocation(Target const* tgt, + std::string const& config); template <typename Target> static const char* GetLocation(Target const* tgt, std::string const& prop, @@ -71,7 +71,7 @@ private: context)) { return nullptr; } - return ComputeLocationForBuild(tgt); + return ComputeLocationForBuild(tgt).c_str(); } // Support "LOCATION_<CONFIG>". @@ -82,7 +82,7 @@ private: return nullptr; } std::string configName = prop.substr(9); - return ComputeLocation(tgt, configName); + return ComputeLocation(tgt, configName).c_str(); } // Support "<CONFIG>_LOCATION". @@ -95,7 +95,7 @@ private: context)) { return nullptr; } - return ComputeLocation(tgt, configName); + return ComputeLocation(tgt, configName).c_str(); } } } |