MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / GetLines

Method GetLines

DebugView++Lib/VectorLineBuffer.cpp:36–45  ·  view source on GitHub ↗

m_backingBuffer can not be moved since it is a member variabele and only rvalues can be moved. returning a 'const Lines&' here might be an performance improvement, however, tests reveiled no measureable difference.

Source from the content-addressed store, hash-verified

34// m_backingBuffer can not be moved since it is a member variabele and only rvalues can be moved.
35// returning a 'const Lines&' here might be an performance improvement, however, tests reveiled no measureable difference.
36Lines VectorLineBuffer::GetLines()
37{
38 // the swap trick used here is very important to unblock the calling process asap.
39 m_backingBuffer.clear();
40 {
41 std::unique_lock<std::mutex> lock(m_linesMutex);
42 m_buffer.swap(m_backingBuffer);
43 }
44 return m_backingBuffer;
45}
46
47bool VectorLineBuffer::Empty() const
48{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected