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/cmcmd.cxx | |
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/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 2027722..87da108 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -917,8 +917,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) if (args.size() >= 9 && args[8].length() >= 8 && args[8].substr(0, 8) == "--color=") { // Enable or disable color based on the switch value. - color = (args[8].size() == 8 || - cmSystemTools::IsOn(args[8].substr(8).c_str())); + color = + (args[8].size() == 8 || cmSystemTools::IsOn(args[8].substr(8))); } } else { // Support older signature for existing makefiles: @@ -1354,7 +1354,7 @@ int cmcmd::ExecuteEchoColor(std::vector<std::string>& args) // Enable or disable color based on the switch value. std::string value = args[i].substr(9); if (!value.empty()) { - enabled = cmSystemTools::IsOn(value.c_str()); + enabled = cmSystemTools::IsOn(value); } } else if (cmHasLiteralPrefix(args[i], "--progress-dir=")) { progressDir = args[i].substr(15); @@ -1407,7 +1407,7 @@ int cmcmd::ExecuteLinkScript(std::vector<std::string>& args) bool verbose = false; if (args.size() >= 4) { if (args[3].find("--verbose=") == 0) { - if (!cmSystemTools::IsOff(args[3].substr(10).c_str())) { + if (!cmSystemTools::IsOff(args[3].substr(10))) { verbose = true; } } |