diff options
author | Matthias Maennich <matthias@maennich.net> | 2017-10-05 10:43:06 (GMT) |
---|---|---|
committer | Matthias Maennich <matthias@maennich.net> | 2017-10-23 15:51:35 (GMT) |
commit | 57132765e078a8654d1166d7d8a1c29ec01f47b4 (patch) | |
tree | d51bdca75aec3b2446c5c3963046608f67406f88 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | fa501bc8262e4a0fa6207d351eef3bf6822748ef (diff) | |
download | CMake-57132765e078a8654d1166d7d8a1c29ec01f47b4.zip CMake-57132765e078a8654d1166d7d8a1c29ec01f47b4.tar.gz CMake-57132765e078a8654d1166d7d8a1c29ec01f47b4.tar.bz2 |
Replace cmArray{Begin,End,Size} by their standard counterparts
std::{begin,end} are part of C++11, std::{cbegin,cend} are part of C++14
and an standard compliant implementation has been introduced within the
'cm' namespace: cm::{cbegin,cend}.
std::size is only part of C++17, hence exposing a compliant implementation
within namespace cm (cm::size).
where possible, the standard implementations are reused.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 1a1b1e2..0a303b0 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -15,6 +15,7 @@ #include "cmVisualStudioGeneratorOptions.h" #include "windows.h" +#include <iterator> #include <memory> // IWYU pragma: keep static std::string cmVS10EscapeXML(std::string arg) @@ -2368,14 +2369,14 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( // Choose a language whose flags to use for ClCompile. static const char* clLangs[] = { "CXX", "C", "Fortran", "CSharp" }; std::string langForClCompile; - if (std::find(cmArrayBegin(clLangs), cmArrayEnd(clLangs), linkLanguage) != - cmArrayEnd(clLangs)) { + if (std::find(cm::cbegin(clLangs), cm::cend(clLangs), linkLanguage) != + cm::cend(clLangs)) { langForClCompile = linkLanguage; } else { std::set<std::string> languages; this->GeneratorTarget->GetLanguages(languages, configName); - for (const char* const* l = cmArrayBegin(clLangs); - l != cmArrayEnd(clLangs); ++l) { + for (const char* const* l = cm::cbegin(clLangs); l != cm::cend(clLangs); + ++l) { if (languages.find(*l) != languages.end()) { langForClCompile = *l; break; |