MCPcopy Create free account
hub / github.com/COVESA/vsomeip / shift_front

Method shift_front

implementation/endpoints/src/local_receive_buffer.cpp:100–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void local_receive_buffer::shift_front() {
101 if (start_ == 0) {
102 return;
103 }
104 // Do NOT:
105 // * Use iterator arithmetics as it relies on ptrdiff_t which is int32_t on a u32 architecture,
106 // but the max message size that needs support is of uint32_t::max.
107 // * memcpy as the regions might overlapp and this is u.b. then
108 std::copy(mem_.data() + start_, mem_.data() + end_, mem_.data());
109 end_ -= start_;
110 start_ = 0;
111}
112
113void local_receive_buffer::shrink() {
114 mem_.resize(initial_buffer_size_, 0x0);

Callers 3

TEST_FFunction · 0.80
processMethod · 0.80
receive_cbkMethod · 0.80

Calls 1

dataMethod · 0.45

Tested by 1

TEST_FFunction · 0.64