Lines Matching refs:capacity
41 ByteBuffer::ByteBuffer() : buffer(nullptr), position(0), limit(0), capacity(0)
45 ByteBuffer::ByteBuffer(int32_t bufferCapacity) : buffer(nullptr), position(0), limit(0), capacity(0)
50 ByteBuffer::ByteBuffer(const char* arr, int32_t length) : buffer(nullptr), position(0), limit(0), capacity(0)
56 ByteBuffer::ByteBuffer(const ByteBuffer& other) : buffer(nullptr), position(0), limit(0), capacity(0)
59 if (buffer != nullptr && capacity > 0) {
60 if (memcpy_s(buffer.get(), capacity, other.GetBufferPtr(), other.GetCapacity()) != EOK) {
82 capacity = bufferCapacity;
97 if (buffer != nullptr && other.GetBufferPtr() != nullptr && capacity > 0) {
98 if (memcpy_s(buffer.get(), capacity, other.GetBufferPtr(), other.GetCapacity()) != EOK) {
152 return capacity;
422 if (buffer != nullptr && position < capacity) {
423 if (memset_s(buffer.get() + position, capacity - position, 0, capacity - position) != EOK) {
497 if (position >= capacity || limit > capacity || position >= limit || buffer == nullptr) {
498 SIGNATURE_TOOLS_LOGE("position %d capacity %d limit %d error", position, capacity, limit);
504 capacity = rem;
511 if (position >= capacity || limit > capacity || position >= limit || buffer == nullptr) {
512 SIGNATURE_TOOLS_LOGE("position %d capacity %d limit %d error",
513 position, capacity, limit);
528 capacity = newCapacity;
529 limit = capacity;
539 newBuffer->capacity = capacity;
556 if (lim <= capacity && lim >= position) {
574 limit = capacity;
589 if (capacity != other.GetCapacity() || other.GetBufferPtr() == nullptr || buffer == nullptr) {
594 for (int32_t i = 0; i < capacity; i++) {
606 if (capacity != static_cast<int32_t>(other.size()) || buffer == nullptr) {
610 for (int32_t i = 0; i < capacity; i++) {
626 capacity = 0;