diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-05 01:01:05 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-05 01:01:06 +0200 |
commit | 327b305e95187fda869c5af407e78a17e0e381cd (patch) | |
tree | fc51c7579a9c1fed3c3993ac2ea68bf9dd32f8bb /src/gui/rhi/qrhivulkan.cpp | |
parent | da284ef10e0ef80776b9fc9b7bb0e6dc8d71ba63 (diff) | |
parent | a2e718a71abad719ea196e9dc4d90d9267102f54 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I554a2762890391b3b6013c8b82211a8386a4ced8
Diffstat (limited to 'src/gui/rhi/qrhivulkan.cpp')
-rw-r--r-- | src/gui/rhi/qrhivulkan.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/rhi/qrhivulkan.cpp b/src/gui/rhi/qrhivulkan.cpp index cb32aa08f3..36a6557e04 100644 --- a/src/gui/rhi/qrhivulkan.cpp +++ b/src/gui/rhi/qrhivulkan.cpp @@ -3241,12 +3241,12 @@ QVector<int> QRhiVulkan::supportedSampleCounts() const VkSampleCountFlags stencil = limits->framebufferStencilSampleCounts; QVector<int> result; - for (size_t i = 0; i < sizeof(qvk_sampleCounts) / sizeof(qvk_sampleCounts[0]); ++i) { - if ((color & qvk_sampleCounts[i].mask) - && (depth & qvk_sampleCounts[i].mask) - && (stencil & qvk_sampleCounts[i].mask)) + for (const auto &qvk_sampleCount : qvk_sampleCounts) { + if ((color & qvk_sampleCount.mask) + && (depth & qvk_sampleCount.mask) + && (stencil & qvk_sampleCount.mask)) { - result.append(qvk_sampleCounts[i].count); + result.append(qvk_sampleCount.count); } } @@ -3263,9 +3263,9 @@ VkSampleCountFlagBits QRhiVulkan::effectiveSampleCount(int sampleCount) return VK_SAMPLE_COUNT_1_BIT; } - for (size_t i = 0; i < sizeof(qvk_sampleCounts) / sizeof(qvk_sampleCounts[0]); ++i) { - if (qvk_sampleCounts[i].count == sampleCount) - return qvk_sampleCounts[i].mask; + for (const auto &qvk_sampleCount : qvk_sampleCounts) { + if (qvk_sampleCount.count == sampleCount) + return qvk_sampleCount.mask; } Q_UNREACHABLE(); |