MCPcopy Create free account
hub / github.com/apple/foundationdb / consume

Method consume

fdbclient/include/fdbclient/BackupAgent.actor.h:974–982  ·  view source on GitHub ↗

Return a pointer to len bytes at the current read position and advance read pos

Source from the content-addressed store, hash-verified

972
973 // Return a pointer to len bytes at the current read position and advance read pos
974 const uint8_t* consume(unsigned int len) {
975 if (rptr == end && len != 0)
976 throw end_of_stream();
977 const uint8_t* p = rptr;
978 rptr += len;
979 if (rptr > end)
980 throw failure_error;
981 return p;
982 }
983
984 // Return a T from the current read position and advance read pos
985 template <typename T>

Callers

nothing calls this directly

Calls 1

consumeFunction · 0.85

Tested by

no test coverage detected