diff options
author | Jochen Seemann <seemann.jochen@gmail.com> | 2018-07-22 19:52:19 +0200 |
---|---|---|
committer | Jochen Seemann <seemann.jochen@gmail.com> | 2019-01-04 22:22:35 +0000 |
commit | 4e735ae42aca5c6957d8cf57d6858322569b794a (patch) | |
tree | e98bdf4d81ef199f62d7fdce62c7b8d74e73e3dc /src/multimedia/video/qvideoframe.cpp | |
parent | 2403f8dc6f1f72bab326025a78b98ec5f81a3d34 (diff) |
multimedia: modernize by using nullptr
Change-Id: Id1084fec084b972aaa1d2389ee56ee831a821172
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Diffstat (limited to 'src/multimedia/video/qvideoframe.cpp')
-rw-r--r-- | src/multimedia/video/qvideoframe.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/multimedia/video/qvideoframe.cpp b/src/multimedia/video/qvideoframe.cpp index 7b1998afc..867bf1092 100644 --- a/src/multimedia/video/qvideoframe.cpp +++ b/src/multimedia/video/qvideoframe.cpp @@ -75,7 +75,7 @@ public: , planeCount(0) , pixelFormat(QVideoFrame::Format_Invalid) , fieldType(QVideoFrame::ProgressiveFrame) - , buffer(0) + , buffer(nullptr) , mappedCount(0) { memset(data, 0, sizeof(data)); @@ -90,7 +90,7 @@ public: , planeCount(0) , pixelFormat(format) , fieldType(QVideoFrame::ProgressiveFrame) - , buffer(0) + , buffer(nullptr) , mappedCount(0) { memset(data, 0, sizeof(data)); @@ -412,7 +412,7 @@ QVideoFrame::~QVideoFrame() */ bool QVideoFrame::isValid() const { - return d->buffer != 0; + return d->buffer != nullptr; } /*! @@ -488,7 +488,7 @@ void QVideoFrame::setFieldType(QVideoFrame::FieldType field) bool QVideoFrame::isMapped() const { - return d->buffer != 0 && d->buffer->mapMode() != QAbstractVideoBuffer::NotMapped; + return d->buffer != nullptr && d->buffer->mapMode() != QAbstractVideoBuffer::NotMapped; } /*! @@ -507,7 +507,7 @@ bool QVideoFrame::isMapped() const */ bool QVideoFrame::isWritable() const { - return d->buffer != 0 && (d->buffer->mapMode() & QAbstractVideoBuffer::WriteOnly); + return d->buffer != nullptr && (d->buffer->mapMode() & QAbstractVideoBuffer::WriteOnly); } /*! @@ -523,7 +523,7 @@ bool QVideoFrame::isWritable() const */ bool QVideoFrame::isReadable() const { - return d->buffer != 0 && (d->buffer->mapMode() & QAbstractVideoBuffer::ReadOnly); + return d->buffer != nullptr && (d->buffer->mapMode() & QAbstractVideoBuffer::ReadOnly); } /*! @@ -533,7 +533,7 @@ bool QVideoFrame::isReadable() const */ QAbstractVideoBuffer::MapMode QVideoFrame::mapMode() const { - return d->buffer != 0 ? d->buffer->mapMode() : QAbstractVideoBuffer::NotMapped; + return d->buffer != nullptr ? d->buffer->mapMode() : QAbstractVideoBuffer::NotMapped; } /*! @@ -587,7 +587,7 @@ bool QVideoFrame::map(QAbstractVideoBuffer::MapMode mode) } } - Q_ASSERT(d->data[0] == 0); + Q_ASSERT(d->data[0] == nullptr); Q_ASSERT(d->bytesPerLine[0] == 0); Q_ASSERT(d->planeCount == 0); Q_ASSERT(d->mappedBytes == 0); @@ -767,7 +767,7 @@ uchar *QVideoFrame::bits() */ uchar *QVideoFrame::bits(int plane) { - return plane >= 0 && plane < d->planeCount ? d->data[plane] : 0; + return plane >= 0 && plane < d->planeCount ? d->data[plane] : nullptr; } /*! @@ -798,7 +798,7 @@ const uchar *QVideoFrame::bits() const */ const uchar *QVideoFrame::bits(int plane) const { - return plane >= 0 && plane < d->planeCount ? d->data[plane] : 0; + return plane >= 0 && plane < d->planeCount ? d->data[plane] : nullptr; } /*! @@ -836,7 +836,7 @@ int QVideoFrame::planeCount() const */ QVariant QVideoFrame::handle() const { - return d->buffer != 0 ? d->buffer->handle() : QVariant(); + return d->buffer != nullptr ? d->buffer->handle() : QVariant(); } /*! |