Lines Matching refs:limit
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)
65 limit = other.GetLimit();
81 limit = bufferCapacity;
103 limit = other.GetLimit();
120 if (getDataLast > static_cast<int64_t>(limit)) {
121 SIGNATURE_TOOLS_LOGE("position: %d, index: %d, limit: %d", position, index, limit);
300 if ((limit - position) >= static_cast<int64_t>(sizeof(value))) {
301 if (memcpy_s(buffer.get() + position, limit - position, &value, sizeof(value)) != EOK) {
311 if (buffer != nullptr && offset >= 0 && limit - offset >= static_cast<int32_t>(sizeof(value))) {
312 if (memcpy_s((buffer.get() + offset), (limit - offset), &value, sizeof(value)) != EOK) {
320 if (buffer != nullptr && offset >= 0 && limit - offset >= static_cast<int16_t>(sizeof(value))) {
321 if (memcpy_s((buffer.get() + offset), (limit - offset), &value, sizeof(value)) != EOK) {
329 if (buffer != nullptr && offset >= 0 && limit - offset >= static_cast<int32_t>(sizeof(value))) {
330 if (memcpy_s((buffer.get() + offset), (limit - offset), (&value), sizeof(value)) != EOK) {
338 if (buffer != nullptr && data != nullptr && offset >= 0 && len > 0 && (limit - offset) >= len) {
339 if (memcpy_s((buffer.get() + offset), (limit - offset), data, len) != EOK) {
347 if (buffer != nullptr && data != nullptr && offset >= 0 && len > 0 && (limit - offset) >= len) {
348 if (memcpy_s((buffer.get() + offset), (limit - offset), data, len) != EOK) {
357 if (buffer != nullptr && data != nullptr && offset >= 0 && len > 0 && (limit - offset) >= len) {
358 if (memcpy_s((buffer.get() + offsetAdd), (limit - offsetAdd), data, len) != EOK) {
367 if (limit - position >= static_cast<int32_t>(sizeof(value))) {
368 if (memcpy_s(buffer.get() + position, limit - position, &value, sizeof(value)) != EOK) {
378 if (limit - position >= static_cast<int16_t>(sizeof(value))) {
379 if (memcpy_s(buffer.get() + position, limit - position, &value, sizeof(value)) != EOK) {
389 if (limit - position >= static_cast<int8_t>(sizeof(value))) {
390 if (memcpy_s(buffer.get() + position, limit - position, &value, sizeof(value)) != EOK) {
400 if (limit - position >= static_cast<uint16_t>(sizeof(value))) {
401 if (memcpy_s(buffer.get() + position, limit - position, &value, sizeof(value)) != EOK) {
411 if (limit - position >= static_cast<uint32_t>(sizeof(value))) {
412 if (memcpy_s(buffer.get() + position, limit - position, &value, sizeof(value)) != EOK) {
431 if (buffer != nullptr && limit - position >= static_cast<char>(sizeof(value))) {
432 if (memcpy_s(buffer.get() + position, limit - position, &value, sizeof(value)) != EOK) {
447 if (buffer != nullptr && data != nullptr && len > 0 && (limit - position) >= len) {
448 if (memcpy_s((buffer.get() + position), (limit - position), data, len) != EOK) {
458 if (buffer != nullptr && data != nullptr && len > 0 && (limit - position) >= len) {
459 if (memcpy_s((buffer.get() + position), (limit - position), data, len) != EOK) {
490 if (pos >= 0 && pos <= limit) {
497 if (position >= capacity || limit > capacity || position >= limit || buffer == nullptr) {
498 SIGNATURE_TOOLS_LOGE("position %d capacity %d limit %d error", position, capacity, limit);
501 int32_t rem = (position <= limit ? limit - position : 0);
505 limit = 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);
516 int32_t newCapacity = limit - position;
529 limit = capacity;
538 newBuffer->limit = limit;
551 return limit;
557 limit = lim;
563 return position < limit ? limit - position : 0;
568 return position < limit;
574 limit = capacity;
579 limit = position;
625 limit = 0;