MCPcopy Create free account
hub / github.com/cuberite/cuberite / GetUsedSpace

Method GetUsedSpace

src/ByteBuffer.cpp:242–249  ·  view source on GitHub ↗

Returns the number of bytes that are currently in the ringbuffer. Note GetReadableBytes()

Source from the content-addressed store, hash-verified

240
241/// Returns the number of bytes that are currently in the ringbuffer. Note GetReadableBytes()
242size_t cByteBuffer::GetUsedSpace(void) const
243{
244 CHECK_THREAD;
245 CheckValid();
246 ASSERT(m_BufferSize >= GetFreeSpace());
247 ASSERT((m_BufferSize - GetFreeSpace()) >= 1);
248 return m_BufferSize - GetFreeSpace() - 1;
249}
250
251
252

Callers 2

AddReceivedDataMethod · 0.80
~cPacketizerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected