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/cmTarget.cxx | |
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/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index b69d4e8..a0c217b 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -39,13 +39,13 @@ #include "cmake.h" template <> -const char* cmTargetPropertyComputer::ComputeLocationForBuild<cmTarget>( +const std::string& cmTargetPropertyComputer::ComputeLocationForBuild<cmTarget>( cmTarget const* tgt) { static std::string loc; if (tgt->IsImported()) { loc = tgt->ImportedGetFullPath("", cmStateEnums::RuntimeBinaryArtifact); - return loc.c_str(); + return loc; } cmGlobalGenerator* gg = tgt->GetGlobalGenerator(); @@ -54,18 +54,18 @@ const char* cmTargetPropertyComputer::ComputeLocationForBuild<cmTarget>( } cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); loc = gt->GetLocationForBuild(); - return loc.c_str(); + return loc; } template <> -const char* cmTargetPropertyComputer::ComputeLocation<cmTarget>( +const std::string& cmTargetPropertyComputer::ComputeLocation<cmTarget>( cmTarget const* tgt, const std::string& config) { static std::string loc; if (tgt->IsImported()) { loc = tgt->ImportedGetFullPath(config, cmStateEnums::RuntimeBinaryArtifact); - return loc.c_str(); + return loc; } cmGlobalGenerator* gg = tgt->GetGlobalGenerator(); @@ -74,7 +74,7 @@ const char* cmTargetPropertyComputer::ComputeLocation<cmTarget>( } cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); loc = gt->GetFullPath(config, cmStateEnums::RuntimeBinaryArtifact); - return loc.c_str(); + return loc; } template <> |