FIFOBuffer::read(T*, std::size_t) documentation inaccurate #869

This commit is contained in:
Aleksandar Fabijanic 2015-06-23 21:07:01 -05:00
parent bd057090c3
commit 5781bcbe35

View File

@ -175,11 +175,11 @@ public:
std::size_t read(T* pBuffer, std::size_t length)
/// Copies the data currently in the FIFO
/// into the supplied buffer.
/// Resizes the supplied buffer to the size of
/// data written to it.
/// into the supplied buffer, which must be
/// preallocated to at least the length size
/// before calling this function.
///
/// Returns the reference to the buffer.
/// Returns the size of the copied data.
{
if (0 == length) return 0;
Mutex::ScopedLock lock(_mutex);
@ -202,7 +202,7 @@ public:
/// Resizes the supplied buffer to the size of
/// data written to it.
///
/// Returns the reference to the buffer.
/// Returns the size of the copied data.
{
Mutex::ScopedLock lock(_mutex);
if (!isReadable()) return 0;