summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2018-08-31 23:01:22 (GMT)
committerBrad King <brad.king@kitware.com>2018-09-05 19:12:57 (GMT)
commit6f16be6a6265ee19bd8193da8a7a0d111717ee80 (patch)
tree3c4cf88923ac34587e5abe2d2f701c7572cc599c /Source/cmFileCommand.cxx
parent612975c6652c83c29fcfcf56a7b5a0cfe0218c93 (diff)
downloadCMake-6f16be6a6265ee19bd8193da8a7a0d111717ee80.zip
CMake-6f16be6a6265ee19bd8193da8a7a0d111717ee80.tar.gz
CMake-6f16be6a6265ee19bd8193da8a7a0d111717ee80.tar.bz2
Remove unnecessary c_str() calls
Use the new IsOn(),IsOff() overloads.
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 1c29017..54af2f4 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -784,10 +784,10 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
if (*i == "LIST_DIRECTORIES") {
++i; // skip LIST_DIRECTORIES
if (i != args.end()) {
- if (cmSystemTools::IsOn(i->c_str())) {
+ if (cmSystemTools::IsOn(*i)) {
g.SetListDirs(true);
g.SetRecurseListDirs(true);
- } else if (cmSystemTools::IsOff(i->c_str())) {
+ } else if (cmSystemTools::IsOff(*i)) {
g.SetListDirs(false);
g.SetRecurseListDirs(false);
} else {
@@ -1756,7 +1756,7 @@ struct cmFileInstaller : public cmFileCopier
// Check whether to copy files always or only if they have changed.
std::string install_always;
if (cmSystemTools::GetEnv("CMAKE_INSTALL_ALWAYS", install_always)) {
- this->Always = cmSystemTools::IsOn(install_always.c_str());
+ this->Always = cmSystemTools::IsOn(install_always);
}
// Get the current manifest.
this->Manifest =
@@ -2747,7 +2747,7 @@ bool cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
} else if (*i == "TLS_VERIFY") {
++i;
if (i != args.end()) {
- tls_verify = cmSystemTools::IsOn(i->c_str());
+ tls_verify = cmSystemTools::IsOn(*i);
} else {
this->SetError("TLS_VERIFY missing bool value.");
return false;