diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-05-26 03:01:03 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-05-26 03:01:03 +0200 |
commit | 8dbed9a2ab1ea3027504912e5ff6eb49d99bbcb1 (patch) | |
tree | 1e9920a54d4a580e652988d810390e361edd7d97 | |
parent | 6c95a111bf2dae2e9b0acc3e0c8580494daa6822 (diff) | |
parent | 3eeb545694657a30a93c9aa8ce49d5015861c119 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I6851380a0a60a0955140bd792a85d12df2fca5cd
-rw-r--r-- | .qmake.conf | 2 | ||||
-rw-r--r-- | src/imports/qtcanvas3d/glcommandqueue.cpp | 2 | ||||
-rw-r--r-- | src/imports/qtcanvas3d/glcommandqueue_p.h | 9 |
3 files changed, 6 insertions, 7 deletions
diff --git a/.qmake.conf b/.qmake.conf index d42c801..6acb9d9 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,5 +1,5 @@ load(qt_build_config) - +CONFIG += warning_clean DEFINES += QT_NO_FOREACH MODULE_VERSION = 5.12.0 diff --git a/src/imports/qtcanvas3d/glcommandqueue.cpp b/src/imports/qtcanvas3d/glcommandqueue.cpp index 929d7f8..9eaf928 100644 --- a/src/imports/qtcanvas3d/glcommandqueue.cpp +++ b/src/imports/qtcanvas3d/glcommandqueue.cpp @@ -178,7 +178,7 @@ GlCommand &CanvasGlCommandQueue::queueCommand(CanvasGlCommandQueue::GlCommandId */ void CanvasGlCommandQueue::transferCommands(GlCommand executeQueue[]) { - memcpy(executeQueue, m_queue.data(), m_queuedCount * sizeof(GlCommand)); + std::copy_n(m_queue.constData(), m_queuedCount, executeQueue); m_queuedCount = 0; diff --git a/src/imports/qtcanvas3d/glcommandqueue_p.h b/src/imports/qtcanvas3d/glcommandqueue_p.h index b40cb66..1c2d1fb 100644 --- a/src/imports/qtcanvas3d/glcommandqueue_p.h +++ b/src/imports/qtcanvas3d/glcommandqueue_p.h @@ -331,31 +331,30 @@ inline bool operator!=(CanvasGlCommandQueue::GlResource lhs, CanvasGlCommandQueu class GlCommand { public: - GlCommand() + Q_DECL_CONSTEXPR GlCommand() : data(0), id(CanvasGlCommandQueue::internalNoCommand), i1(0), i2(0), i3(0), i4(0), i5(0), i6(0), i7(0), i8(0) {} - GlCommand(CanvasGlCommandQueue::GlCommandId command) + Q_DECL_CONSTEXPR GlCommand(CanvasGlCommandQueue::GlCommandId command) : data(0), id(command), i1(0), i2(0), i3(0), i4(0), i5(0), i6(0), i7(0), i8(0) {} - GlCommand(CanvasGlCommandQueue::GlCommandId command, + Q_DECL_CONSTEXPR GlCommand(CanvasGlCommandQueue::GlCommandId command, GLint p1, GLint p2 = 0, GLint p3 = 0, GLint p4 = 0, GLint p5 = 0, GLint p6 = 0, GLint p7 = 0, GLint p8 = 0) : data(0), id(command), i1(p1), i2(p2), i3(p3), i4(p4), i5(p5), i6(p6), i7(p7), i8(p8) {} - GlCommand(CanvasGlCommandQueue::GlCommandId command, + Q_DECL_CONSTEXPR GlCommand(CanvasGlCommandQueue::GlCommandId command, GLfloat p1, GLfloat p2 = 0.0f, GLfloat p3 = 0.0f, GLfloat p4 = 0.0f) : data(0), id(command), i1(0), i2(0), i3(0), i4(0), f1(p1), f2(p2), f3(p3), f4(p4) {} - ~GlCommand() {} void deleteData() { delete data; |