From 471a6d0c28bccaa327d75d30b789f26df62ebdec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 27 Aug 2018 13:40:36 +0200 Subject: [PATCH] GL: properly move BufferImage::dataSize(). Discovered with PVS-Studio, many thanks to @alexesDev for collecting the report. --- src/Magnum/GL/BufferImage.h | 3 ++- src/Magnum/GL/Test/BufferImageGLTest.cpp | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Magnum/GL/BufferImage.h b/src/Magnum/GL/BufferImage.h index 56e16b2af..a6786e1c8 100644 --- a/src/Magnum/GL/BufferImage.h +++ b/src/Magnum/GL/BufferImage.h @@ -764,7 +764,7 @@ typedef CompressedBufferImage<2> CompressedBufferImage2D; /** @brief Three-dimensional compressed buffer image */ typedef CompressedBufferImage<3> CompressedBufferImage3D; -template inline BufferImage::BufferImage(BufferImage&& other) noexcept: _storage{std::move(other._storage)}, _format{std::move(other._format)}, _type{std::move(other._type)}, _size{std::move(other._size)}, _buffer{std::move(other._buffer)} { +template inline BufferImage::BufferImage(BufferImage&& other) noexcept: _storage{std::move(other._storage)}, _format{std::move(other._format)}, _type{std::move(other._type)}, _size{std::move(other._size)}, _buffer{std::move(other._buffer)}, _dataSize{std::move(other._dataSize)} { other._size = {}; } @@ -780,6 +780,7 @@ template inline BufferImage& BufferImage