diff --git a/include/exiv2/types.hpp b/include/exiv2/types.hpp index 69edf8c1..b88c8f74 100644 --- a/include/exiv2/types.hpp +++ b/include/exiv2/types.hpp @@ -166,37 +166,15 @@ namespace Exiv2 { //! @name Creators //@{ //! Default constructor - DataBuf(); + DataBuf() = default; //! Constructor with an initial buffer size explicit DataBuf(long size); //! Constructor, copies an existing buffer DataBuf(const byte* pData, long size); - /*! - @brief Copy constructor. Copies an existing DataBuf. - */ - DataBuf(const DataBuf& rhs); - /*! - @brief Move constructor. Transfers the buffer to the newly created - object similar to std::unique_ptr, i.e., the original object is - modified. - */ - DataBuf(DataBuf&& rhs); - //! Destructor, deletes the allocated buffer - ~DataBuf(); //@} //! @name Manipulators //@{ - /*! - @brief Assignment operator. Transfers the buffer and releases the - buffer at the original object similar to std::unique_ptr, i.e., - the original object is modified. - */ - DataBuf& operator=(DataBuf&& rhs); - - // No copy assignment. - DataBuf& operator=(const DataBuf&) = delete; - /*! @brief Allocate a data buffer of at least the given size. Note that if the requested \em size is less than the current buffer size, no diff --git a/src/types.cpp b/src/types.cpp index 5ea2714c..9db1db5a 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -118,17 +118,6 @@ namespace Exiv2 { return tit->size_; } - DataBuf::DataBuf(DataBuf&& rhs) - : pData_(std::move(rhs.pData_)) - { - } - - DataBuf::~DataBuf() - { } - - DataBuf::DataBuf() : pData_() - {} - DataBuf::DataBuf(long size) : pData_(size) {} @@ -137,18 +126,6 @@ namespace Exiv2 { std::copy_n(pData, size, pData_.begin()); } - DataBuf::DataBuf(const DataBuf& rhs) - : DataBuf(rhs.pData_.data(), rhs.pData_.size()) - {} - - DataBuf& DataBuf::operator=(DataBuf&& rhs) - { - if (this == &rhs) - return *this; - pData_ = std::move(rhs.pData_); - return *this; - } - void DataBuf::alloc(long size) { pData_.resize(size);