diff options
Diffstat (limited to 'common/rfb/PixelBuffer.cxx')
-rw-r--r-- | common/rfb/PixelBuffer.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/rfb/PixelBuffer.cxx b/common/rfb/PixelBuffer.cxx index c8b5f3d7..f1354a43 100644 --- a/common/rfb/PixelBuffer.cxx +++ b/common/rfb/PixelBuffer.cxx @@ -326,7 +326,7 @@ FullFramePixelBuffer::FullFramePixelBuffer(const PixelFormat& pf, int w, int h, { } -FullFramePixelBuffer::FullFramePixelBuffer() : data(0) {} +FullFramePixelBuffer::FullFramePixelBuffer() : data(nullptr) {} FullFramePixelBuffer::~FullFramePixelBuffer() {} @@ -365,7 +365,7 @@ void FullFramePixelBuffer::setBuffer(int width, int height, throw rfb::Exception("Invalid PixelBuffer height of %d pixels requested", height); if ((stride_ < 0) || (stride_ > maxPixelBufferStride) || (stride_ < width)) throw rfb::Exception("Invalid PixelBuffer stride of %d pixels requested", stride_); - if ((width != 0) && (height != 0) && (data_ == NULL)) + if ((width != 0) && (height != 0) && (data_ == nullptr)) throw rfb::Exception("PixelBuffer requested without a valid memory area"); ModifiablePixelBuffer::setSize(width, height); @@ -383,12 +383,12 @@ void FullFramePixelBuffer::setSize(int /*w*/, int /*h*/) // Automatically allocates enough space for the specified format & area ManagedPixelBuffer::ManagedPixelBuffer() - : data_(NULL), datasize(0) + : data_(nullptr), datasize(0) { } ManagedPixelBuffer::ManagedPixelBuffer(const PixelFormat& pf, int w, int h) - : FullFramePixelBuffer(pf, 0, 0, NULL, 0), data_(NULL), datasize(0) + : FullFramePixelBuffer(pf, 0, 0, nullptr, 0), data_(nullptr), datasize(0) { setSize(w, h); } @@ -413,7 +413,7 @@ void ManagedPixelBuffer::setSize(int w, int h) if (datasize < new_datasize) { if (data_) { delete [] data_; - data_ = NULL; + data_ = nullptr; datasize = 0; } if (new_datasize) { |