diff options
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 69339b4..449db9d 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -34,6 +34,7 @@ #include "cmsys/Terminal.h" #include <algorithm> #include <iostream> +#include <iterator> #include <memory> // IWYU pragma: keep #include <sstream> #include <stdio.h> @@ -371,8 +372,8 @@ int cmcmd::HandleCoCompileCommands(std::vector<std::string>& args) doing_options = false; } else if (doing_options) { bool optionFound = false; - for (CoCompiler const* cc = cmArrayBegin(CoCompilers); - cc != cmArrayEnd(CoCompilers); ++cc) { + for (CoCompiler const* cc = cm::cbegin(CoCompilers); + cc != cm::cend(CoCompilers); ++cc) { size_t optionLen = strlen(cc->Option); if (arg.compare(0, optionLen, cc->Option) == 0) { optionFound = true; @@ -402,8 +403,8 @@ int cmcmd::HandleCoCompileCommands(std::vector<std::string>& args) if (jobs.empty()) { std::cerr << "__run_co_compile missing command to run. " "Looking for one or more of the following:\n"; - for (CoCompiler const* cc = cmArrayBegin(CoCompilers); - cc != cmArrayEnd(CoCompilers); ++cc) { + for (CoCompiler const* cc = cm::cbegin(CoCompilers); + cc != cm::cend(CoCompilers); ++cc) { std::cerr << cc->Option << "\n"; } return 1; @@ -1024,8 +1025,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) } else if (cmHasLiteralPrefix(arg, "--format=")) { format = arg.substr(9); bool isKnown = - std::find(cmArrayBegin(knownFormats), cmArrayEnd(knownFormats), - format) != cmArrayEnd(knownFormats); + std::find(cm::cbegin(knownFormats), cm::cend(knownFormats), + format) != cm::cend(knownFormats); if (!isKnown) { cmSystemTools::Error("Unknown -E tar --format= argument: ", |