MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / Swap

Method Swap

native/thirdpart/flatbuffers/grpc.h:210–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208 }
209
210 void Swap(MessageBuilder &other) {
211 slice_allocator_.swap(other.slice_allocator_);
212 FlatBufferBuilder::Swap(other);
213 // After swapping the FlatBufferBuilder, we swap back the allocator, which
214 // restores the original allocator back in place. This is necessary because
215 // MessageBuilder's allocator is its own member (SliceAllocatorMember). The
216 // allocator passed to FlatBufferBuilder::vector_downward must point to this
217 // member.
218 buf_.swap_allocator(other.buf_);
219 }
220
221 // Releases the ownership of the buffer pointer.
222 // Returns the size, offset, and the original grpc_slice that

Callers 1

MessageBuilderMethod · 0.80

Calls 2

SwapFunction · 0.85
swapMethod · 0.45

Tested by

no test coverage detected