diff --git a/include/mapnik/image_data.hpp b/include/mapnik/image_data.hpp index 3ce19c6a3..bc25c7de8 100644 --- a/include/mapnik/image_data.hpp +++ b/include/mapnik/image_data.hpp @@ -56,6 +56,18 @@ struct buffer if (data_) std::copy(rhs.data_, rhs.data_ + rhs.size_, data_); } + buffer& operator=(buffer rhs) + { + swap(rhs); + return *this; + } + + void swap(buffer & rhs) + { + std::swap(size_, rhs.size_); + std::swap(data_, rhs.data_); + } + inline bool operator!() const { return (data_ == nullptr)? false : true; } ~buffer() {