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

Method add_capacity

implementation/endpoints/src/local_receive_buffer.cpp:121–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121[[nodiscard]] bool local_receive_buffer::add_capacity(size_t _capacity) {
122 if (_capacity > std::numeric_limits<size_t>::max() - mem_.size()) {
123 VSOMEIP_ERROR_P << "Insufficient memory to consume the remaining: " << _capacity << " bytes";
124 return false;
125 }
126 size_t const new_capa = _capacity + mem_.size();
127 mem_.resize(new_capa);
128
129 return true;
130}
131
132[[nodiscard]] bool local_receive_buffer::bump_end(size_t _new_bytes) {
133 if (_new_bytes > mem_.size() - end_) {

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected