diff options
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 7eeb97f..8f619b1 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1054,8 +1054,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args) homeOutDir = args[5]; startOutDir = args[6]; depInfo = args[7]; - if (args.size() >= 9 && args[8].length() >= 8 && - args[8].substr(0, 8) == "--color=") { + if (args.size() >= 9 && cmHasLiteralPrefix(args[8], "--color=")) { // Enable or disable color based on the switch value. color = (args[8].size() == 8 || cmIsOn(args[8].substr(8))); } @@ -1304,7 +1303,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args) } else if (arg == "--debug") { pipe.clear(); isDebug = true; - } else if (arg.substr(0, pipePrefix.size()) == pipePrefix) { + } else if (cmHasPrefix(arg, pipePrefix)) { isDebug = false; pipe = arg.substr(pipePrefix.size()); if (pipe.empty()) { |