Lines Matching refs:other
56 ByteBuffer::ByteBuffer(const ByteBuffer& other) : buffer(nullptr), position(0), limit(0), capacity(0)
58 Init(other.GetCapacity());
60 if (memcpy_s(buffer.get(), capacity, other.GetBufferPtr(), other.GetCapacity()) != EOK) {
64 position = other.GetPosition();
65 limit = other.GetLimit();
89 ByteBuffer& ByteBuffer::operator=(const ByteBuffer& other)
91 if (&other == this) {
96 Init(other.GetCapacity());
97 if (buffer != nullptr && other.GetBufferPtr() != nullptr && capacity > 0) {
98 if (memcpy_s(buffer.get(), capacity, other.GetBufferPtr(), other.GetCapacity()) != EOK) {
102 position = other.GetPosition();
103 limit = other.GetLimit();
584 bool ByteBuffer::IsEqual(const ByteBuffer& other)
586 if (&other == this) {
589 if (capacity != other.GetCapacity() || other.GetBufferPtr() == nullptr || buffer == nullptr) {
593 const char* otherBuffer = other.GetBufferPtr();
604 bool ByteBuffer::IsEqual(const std::string& other)
606 if (capacity != static_cast<int32_t>(other.size()) || buffer == nullptr) {
611 if (buffer.get()[i] != other[i]) {
613 i, buffer.get()[i], other[i]);