image_data : remove unused owns_data_ field

This commit is contained in:
artemp 2014-11-20 15:08:07 +01:00
parent 1757797031
commit 6adf62ec5a

View file

@ -76,8 +76,7 @@ public:
: width_(width), : width_(width),
height_(height), height_(height),
buffer_(width_ * height_ * pixel_size), buffer_(width_ * height_ * pixel_size),
pData_(reinterpret_cast<pixel_type*>(buffer_.data())), pData_(reinterpret_cast<pixel_type*>(buffer_.data()))
owns_data_(true)
{ {
if (pData_ && initialize) std::fill(pData_, pData_ + width_ * height_, 0); if (pData_ && initialize) std::fill(pData_, pData_ + width_ * height_, 0);
} }
@ -86,8 +85,8 @@ public:
: width_(rhs.width_), : width_(rhs.width_),
height_(rhs.height_), height_(rhs.height_),
buffer_(rhs.buffer_), buffer_(rhs.buffer_),
pData_(reinterpret_cast<pixel_type*>(buffer_.data())), pData_(reinterpret_cast<pixel_type*>(buffer_.data()))
owns_data_(true) {} {}
image_data(image_data<pixel_type> && rhs) noexcept image_data(image_data<pixel_type> && rhs) noexcept
: width_(rhs.width_), : width_(rhs.width_),
@ -181,7 +180,6 @@ private:
std::size_t height_; std::size_t height_;
detail::buffer buffer_; detail::buffer buffer_;
pixel_type *pData_; pixel_type *pData_;
bool owns_data_;
}; };
using image_data_32 = image_data<std::uint32_t>; using image_data_32 = image_data<std::uint32_t>;