diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-08 01:00:31 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-08 01:00:31 +0200 |
commit | 38e97c68ba25c29a6fbdd3f79d56fd52a0f58a4c (patch) | |
tree | 10bba7efed661c45e62c89c07f8b0f01d9bf6701 /src/quickshapes | |
parent | 67fc5b677a05f88f043ea825810b7b244a516b42 (diff) | |
parent | e5f3e7149b7e130c375c1419f1f804dfeaf578aa (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ib381f350ada365747ce20b989bfdc368d75f2219
Diffstat (limited to 'src/quickshapes')
-rw-r--r-- | src/quickshapes/qquickshapenvprrenderer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quickshapes/qquickshapenvprrenderer.cpp b/src/quickshapes/qquickshapenvprrenderer.cpp index a5b2a3467c..721091b669 100644 --- a/src/quickshapes/qquickshapenvprrenderer.cpp +++ b/src/quickshapes/qquickshapenvprrenderer.cpp @@ -177,7 +177,7 @@ QDebug operator<<(QDebug debug, const QQuickShapeNvprRenderer::NvprPath &path) debug << "Path with" << path.cmd.count() << "commands"; int ci = 0; for (GLubyte cmd : path.cmd) { - static struct { GLubyte cmd; const char *s; int coordCount; } nameTab[] = { + static struct { GLubyte cmd; const char *s; int coordCount; } nameTabs[] = { { GL_MOVE_TO_NV, "moveTo", 2 }, { GL_LINE_TO_NV, "lineTo", 2 }, { GL_QUADRATIC_CURVE_TO_NV, "quadTo", 4 }, @@ -187,14 +187,14 @@ QDebug operator<<(QDebug debug, const QQuickShapeNvprRenderer::NvprPath &path) { GL_SMALL_CW_ARC_TO_NV, "arcTo-small-CW", 5 }, { GL_SMALL_CCW_ARC_TO_NV, "arcTo-small-CCW", 5 }, { GL_CLOSE_PATH_NV, "closePath", 0 } }; - for (size_t i = 0; i < sizeof(nameTab) / sizeof(nameTab[0]); ++i) { - if (nameTab[i].cmd == cmd) { + for (const auto &nameTab : nameTabs) { + if (nameTab.cmd == cmd) { QByteArray cs; - for (int j = 0; j < nameTab[i].coordCount; ++j) { + for (int j = 0; j < nameTab.coordCount; ++j) { cs.append(QByteArray::number(path.coord[ci++])); cs.append(' '); } - debug << "\n " << nameTab[i].s << " " << cs; + debug << "\n " << nameTab.s << " " << cs; break; } } |