summaryrefslogtreecommitdiffstats
path: root/examples/vulkan/shared/trianglerenderer.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-05-22 10:23:16 +0200
committerMarc Mutz <marc.mutz@kdab.com>2017-05-22 08:50:05 +0000
commitd3f1076d0a3b8b0f44250399ea325020bbe9a0fd (patch)
tree362585a9e1428ddb39eb839f2c01832551fc1c7d /examples/vulkan/shared/trianglerenderer.cpp
parent6ec3a972971a6a83b74f5ccbb24c7bb088a863d3 (diff)
QVulkanWindow: use QVector, not QSet, for small int set
Apart from being more efficient to construct and test, for the expected very small number of entries, the example code itself shows that a sorted vector is much more useful than an unordered set. Change-Id: Ic5e38df0176ac4be08eac6a89c2e1cabab2a9020 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'examples/vulkan/shared/trianglerenderer.cpp')
-rw-r--r--examples/vulkan/shared/trianglerenderer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/vulkan/shared/trianglerenderer.cpp b/examples/vulkan/shared/trianglerenderer.cpp
index a0800080a0..7327c5a706 100644
--- a/examples/vulkan/shared/trianglerenderer.cpp
+++ b/examples/vulkan/shared/trianglerenderer.cpp
@@ -73,7 +73,7 @@ TriangleRenderer::TriangleRenderer(QVulkanWindow *w, bool msaa)
: m_window(w)
{
if (msaa) {
- QSet<int> counts = w->supportedSampleCounts();
+ const QVector<int> counts = w->supportedSampleCounts();
qDebug() << "Supported sample counts:" << counts;
for (int s = 16; s >= 4; s /= 2) {
if (counts.contains(s)) {