fix msvs compile by using explicit assigment operator - closes #2588
This commit is contained in:
parent
4b2ad9e65f
commit
653cc08500
1 changed files with 12 additions and 0 deletions
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue