summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglbuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/opengl/qopenglbuffer.cpp')
-rw-r--r--src/gui/opengl/qopenglbuffer.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp
index 537097c09f..5387cc06e3 100644
--- a/src/gui/opengl/qopenglbuffer.cpp
+++ b/src/gui/opengl/qopenglbuffer.cpp
@@ -143,10 +143,10 @@ public:
QOpenGLBufferPrivate(QOpenGLBuffer::Type t)
: ref(1),
type(t),
- guard(0),
+ guard(nullptr),
usagePattern(QOpenGLBuffer::StaticDraw),
actualUsagePattern(QOpenGLBuffer::StaticDraw),
- funcs(0)
+ funcs(nullptr)
{
}
@@ -323,10 +323,10 @@ void QOpenGLBuffer::destroy()
Q_D(QOpenGLBuffer);
if (d->guard) {
d->guard->free();
- d->guard = 0;
+ d->guard = nullptr;
}
delete d->funcs;
- d->funcs = 0;
+ d->funcs = nullptr;
}
/*!
@@ -545,9 +545,9 @@ void *QOpenGLBuffer::map(QOpenGLBuffer::Access access)
qWarning("QOpenGLBuffer::map(): buffer not created");
#endif
if (!d->guard || !d->guard->id())
- return 0;
+ return nullptr;
if (d->funcs->hasOpenGLExtension(QOpenGLExtensions::MapBufferRange)) {
- QOpenGLBuffer::RangeAccessFlags rangeAccess = 0;
+ QOpenGLBuffer::RangeAccessFlags rangeAccess;
switch (access) {
case QOpenGLBuffer::ReadOnly:
rangeAccess = QOpenGLBuffer::RangeRead;
@@ -586,7 +586,7 @@ void *QOpenGLBuffer::mapRange(int offset, int count, QOpenGLBuffer::RangeAccessF
qWarning("QOpenGLBuffer::mapRange(): buffer not created");
#endif
if (!d->guard || !d->guard->id())
- return 0;
+ return nullptr;
return d->funcs->glMapBufferRange(d->type, offset, count, access);
}