MCPcopy Create free account
hub / github.com/apache/thrift / readAppendToString

Method readAppendToString

lib/cpp/src/thrift/transport/TBufferTransports.cpp:341–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341uint32_t TMemoryBuffer::readAppendToString(std::string& str, uint32_t len) {
342 // Don't get some stupid assertion failure.
343 if (buffer_ == nullptr) {
344 return 0;
345 }
346
347 uint8_t* start;
348 uint32_t give;
349 computeRead(len, &start, &give);
350
351 // Append to the provided string.
352 str.append(reinterpret_cast<char*>(start), give);
353
354 return give;
355}
356
357void TMemoryBuffer::ensureCanWrite(uint32_t len) {
358 // Check available space

Callers 2

BOOST_AUTO_TEST_CASEFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 1

appendMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64