diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-09-13 20:43:09 +0200 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-09-30 22:16:27 +0200 |
commit | b0042601ed8056c9ed6056c26f71dfa9fbc951ce (patch) | |
tree | 9288bbda958a9e0755d3179de0fe5325d9bd7898 /examples/opengl/computegles31/glwindow.h | |
parent | fbda189e081e6c7abf82334c0ac71b16ec2c37dd (diff) |
Cleanup QtOpenGL examples
Cleanup the OpenGL examples
- use nullptr (clang-tidy)
- use member-initialization
- avoid redundant checks for != nullptr when deleting a pointer
Change-Id: I3e4702690ed79e71c3e952d51ceef83b907b45b7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'examples/opengl/computegles31/glwindow.h')
-rw-r--r-- | examples/opengl/computegles31/glwindow.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/examples/opengl/computegles31/glwindow.h b/examples/opengl/computegles31/glwindow.h index f243858a45..5375fbb488 100644 --- a/examples/opengl/computegles31/glwindow.h +++ b/examples/opengl/computegles31/glwindow.h @@ -90,21 +90,21 @@ protected: void setAnimating(bool animate); private: - QPropertyAnimation *m_animationForward; - QPropertyAnimation *m_animationBackward; + QPropertyAnimation *m_animationForward = nullptr; + QPropertyAnimation *m_animationBackward = nullptr; QSequentialAnimationGroup *m_animationGroup; - QOpenGLTexture *m_texImageInput; - QOpenGLTexture *m_texImageTmp; - QOpenGLTexture *m_texImageProcessed; - QOpenGLShaderProgram *m_shaderDisplay; - QOpenGLShaderProgram *m_shaderComputeV; - QOpenGLShaderProgram *m_shaderComputeH; + QOpenGLTexture *m_texImageInput = nullptr; + QOpenGLTexture *m_texImageTmp = nullptr; + QOpenGLTexture *m_texImageProcessed = nullptr; + QOpenGLShaderProgram *m_shaderDisplay = nullptr; + QOpenGLShaderProgram *m_shaderComputeV = nullptr; + QOpenGLShaderProgram *m_shaderComputeH = nullptr; QMatrix4x4 m_proj; QSizeF m_quadSize; - int m_blurRadius; - bool m_animate; - QOpenGLVertexArrayObject *m_vao; + int m_blurRadius = 0; + bool m_animate = true; + QOpenGLVertexArrayObject *m_vao = nullptr; }; #endif |