diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-08-31 23:01:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-09-05 19:12:57 (GMT) |
commit | 6f16be6a6265ee19bd8193da8a7a0d111717ee80 (patch) | |
tree | 3c4cf88923ac34587e5abe2d2f701c7572cc599c /Source/CTest | |
parent | 612975c6652c83c29fcfcf56a7b5a0cfe0218c93 (diff) | |
download | CMake-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/CTest')
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestGIT.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 8 | ||||
-rw-r--r-- | Source/CTest/cmCTestVC.cxx | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index c5941ce..a8309d9 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -327,7 +327,7 @@ int cmCTestBuildHandler::ProcessHandler() std::string const& useLaunchers = this->CTest->GetCTestConfiguration("UseLaunchers"); - this->UseCTestLaunch = cmSystemTools::IsOn(useLaunchers.c_str()); + this->UseCTestLaunch = cmSystemTools::IsOn(useLaunchers); // Create a last build log cmGeneratedFileStream ofs; diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx index b919c79..71fcafb 100644 --- a/Source/CTest/cmCTestGIT.cxx +++ b/Source/CTest/cmCTestGIT.cxx @@ -272,7 +272,7 @@ bool cmCTestGIT::UpdateImpl() std::string init_submodules = this->CTest->GetCTestConfiguration("GITInitSubmodules"); - if (cmSystemTools::IsOn(init_submodules.c_str())) { + if (cmSystemTools::IsOn(init_submodules)) { char const* git_submodule_init[] = { git, "submodule", "init", nullptr }; ret = this->RunChild(git_submodule_init, &submodule_out, &submodule_err, top_dir.c_str()); diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index d1d8d08..7fb5e80 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2126,10 +2126,10 @@ bool cmCTestTestHandler::SetTestsProperties( for (cmCTestTestProperties& rt : this->TestList) { if (t == rt.Name) { if (key == "WILL_FAIL") { - rt.WillFail = cmSystemTools::IsOn(val.c_str()); + rt.WillFail = cmSystemTools::IsOn(val); } if (key == "DISABLED") { - rt.Disabled = cmSystemTools::IsOn(val.c_str()); + rt.Disabled = cmSystemTools::IsOn(val); } if (key == "ATTACHED_FILES") { cmSystemTools::ExpandListArgument(val, rt.AttachedFiles); @@ -2172,7 +2172,7 @@ bool cmCTestTestHandler::SetTestsProperties( cmSystemTools::ExpandListArgument(val, rt.RequiredFiles); } if (key == "RUN_SERIAL") { - rt.RunSerial = cmSystemTools::IsOn(val.c_str()); + rt.RunSerial = cmSystemTools::IsOn(val); } if (key == "FAIL_REGULAR_EXPRESSION") { std::vector<std::string> lval; @@ -2188,7 +2188,7 @@ bool cmCTestTestHandler::SetTestsProperties( } } if (key == "PROCESSOR_AFFINITY") { - rt.WantAffinity = cmSystemTools::IsOn(val.c_str()); + rt.WantAffinity = cmSystemTools::IsOn(val); } if (key == "SKIP_RETURN_CODE") { rt.SkipReturnCode = atoi(val.c_str()); diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx index a59d671..21c8889 100644 --- a/Source/CTest/cmCTestVC.cxx +++ b/Source/CTest/cmCTestVC.cxx @@ -146,7 +146,7 @@ bool cmCTestVC::Update() // if update version only is on then do not actually update, // just note the current version and finish if (!cmSystemTools::IsOn( - this->CTest->GetCTestConfiguration("UpdateVersionOnly").c_str())) { + this->CTest->GetCTestConfiguration("UpdateVersionOnly"))) { result = this->NoteOldRevision() && result; this->Log << "--- Begin Update ---\n"; result = this->UpdateImpl() && result; |