diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2019-03-12 11:46:26 +0100 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2019-03-14 07:37:52 +0000 |
commit | 41e7b71c410b77a81d09d3cc2e169ffd7975b4d2 (patch) | |
tree | fd0722a70d1aedf8567cc11babd10adcbbd1e797 /src/opengl/qgl_p.h | |
parent | b35eec360d4d88d094094fb54c101fad6cee5768 (diff) |
More nullptr usage in headers
Diff generated by running clang-tidy's modernize-use-nullptr checker on
the CMake-based Qt version.
Skipping src/3rdparty, examples/, tests/
Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r-- | src/opengl/qgl_p.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index ed364283cc..4e52c0f5e9 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -203,7 +203,7 @@ const QGLContext *qt_gl_transfer_context(const QGLContext *); class QGLTemporaryContextPrivate; class QGLTemporaryContext { public: - explicit QGLTemporaryContext(bool directRendering = true, QWidget *parent = 0); + explicit QGLTemporaryContext(bool directRendering = true, QWidget *parent = nullptr); ~QGLTemporaryContext(); private: @@ -302,7 +302,7 @@ class Q_OPENGL_EXPORT QGLShareContextScope { public: QGLShareContextScope(const QGLContext *ctx) - : m_oldContext(0) + : m_oldContext(nullptr) { QGLContext *currentContext = const_cast<QGLContext *>(QGLContext::currentContext()); if (currentContext != ctx && !QGLContext::areSharing(ctx, currentContext)) { @@ -367,7 +367,7 @@ Q_SIGNALS: class QGLTexture { public: - explicit QGLTexture(QGLContext *ctx = 0, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D, + explicit QGLTexture(QGLContext *ctx = nullptr, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D, QGLContext::BindOptions opt = QGLContext::DefaultBindOption) : context(ctx), id(tx_id), @@ -378,7 +378,7 @@ public: ~QGLTexture() { if (options & QGLContext::MemoryManagedBindOption) { Q_ASSERT(context); - QPlatformPixmap *boundPixmap = 0; + QPlatformPixmap *boundPixmap = nullptr; context->d_ptr->texture_destroyer->emitFreeTexture(context, boundPixmap, id); } } @@ -392,9 +392,9 @@ public: bool canBindCompressedTexture (const char *buf, int len, const char *format, bool *hasAlpha); QSize bindCompressedTexture - (const QString& fileName, const char *format = 0); + (const QString& fileName, const char *format = nullptr); QSize bindCompressedTexture - (const char *buf, int len, const char *format = 0); + (const char *buf, int len, const char *format = nullptr); QSize bindCompressedTextureDDS(const char *buf, int len); QSize bindCompressedTexturePVR(const char *buf, int len); }; |