Lines Matching refs:other
32 DataBuffer::DataBuffer(const DataBuffer &other) noexcept
34 if (other.data_ && other.size_) {
35 capacity_ = other.size_;
37 memcpy_s(data_, capacity_ + 1, other.data_, other.size_);
38 size_ = other.size_;
42 DataBuffer &DataBuffer::operator=(const DataBuffer &other) noexcept
44 if (this != &other) {
45 if (other.data_ && other.size_) {
46 capacity_ = other.size_;
49 memcpy_s(data_, capacity_ + 1, other.data_, other.size_);
50 size_ = other.size_;
57 DataBuffer::DataBuffer(DataBuffer &&other) noexcept
59 data_ = other.data_;
60 size_ = other.size_;
61 capacity_ = other.capacity_;
62 other.data_ = nullptr;
63 other.size_ = 0;
64 other.capacity_ = 0;
67 DataBuffer &DataBuffer::operator=(DataBuffer &&other) noexcept
69 if (this != &other) {
73 data_ = other.data_;
74 size_ = other.size_;
75 capacity_ = other.capacity_;
76 other.data_ = nullptr;
77 other.size_ = 0;
78 other.capacity_ = 0;