diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-23 13:31:18 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-29 17:39:45 (GMT) |
commit | 1f893e587371cbce2007cae55c118fcf50dca849 (patch) | |
tree | 829c7b8aacad16fe739e0589dbd2f3db1e0e7426 /Source/cmVisualStudioGeneratorOptions.cxx | |
parent | 362d6cd234dd8e83577bb72dcbe22949aa9253bf (diff) | |
download | CMake-1f893e587371cbce2007cae55c118fcf50dca849.zip CMake-1f893e587371cbce2007cae55c118fcf50dca849.tar.gz CMake-1f893e587371cbce2007cae55c118fcf50dca849.tar.bz2 |
clang-tidy: fix `modernize-loop-convert` lints
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index af614af..763f676 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -51,9 +51,9 @@ cmVisualStudioGeneratorOptions::cmVisualStudioGeneratorOptions( void cmVisualStudioGeneratorOptions::AddTable(cmVS7FlagTable const* table) { if (table) { - for (int i = 0; i < FlagTableCount; ++i) { - if (!this->FlagTable[i]) { - this->FlagTable[i] = table; + for (auto& flag : this->FlagTable) { + if (!flag) { + flag = table; break; } } @@ -62,8 +62,8 @@ void cmVisualStudioGeneratorOptions::AddTable(cmVS7FlagTable const* table) void cmVisualStudioGeneratorOptions::ClearTables() { - for (int i = 0; i < FlagTableCount; ++i) { - this->FlagTable[i] = nullptr; + for (auto& flag : this->FlagTable) { + flag = nullptr; } } |