summaryrefslogtreecommitdiff
path: root/src/input/ThreadInputStream.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-11-10 19:24:33 +0100
committerMax Kellermann <max@musicpd.org>2017-11-10 19:24:33 +0100
commit49784513b13ae8c5a5811fab8439463964a9e151 (patch)
tree7c2bd603ff23a4cab138b38a15e2892588621dfd /src/input/ThreadInputStream.cxx
parent523051132d77cb5da01847592c4c1e1faae93c6a (diff)
util/{Const,Writable}Buffer, ...: rename IsEmpty() to empty(), imitating STL
Diffstat (limited to 'src/input/ThreadInputStream.cxx')
-rw-r--r--src/input/ThreadInputStream.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input/ThreadInputStream.cxx b/src/input/ThreadInputStream.cxx
index 33fdbe3ba..15f590ec8 100644
--- a/src/input/ThreadInputStream.cxx
+++ b/src/input/ThreadInputStream.cxx
@@ -80,7 +80,7 @@ ThreadInputStream::ThreadFunc()
assert(!postponed_exception);
auto w = buffer.Write();
- if (w.IsEmpty()) {
+ if (w.empty()) {
wake_cond.wait(mutex);
} else {
size_t nbytes;
@@ -122,7 +122,7 @@ ThreadInputStream::IsAvailable() noexcept
{
assert(!thread.IsInside());
- return !buffer.IsEmpty() || eof || postponed_exception;
+ return !buffer.empty() || eof || postponed_exception;
}
inline size_t
@@ -135,7 +135,7 @@ ThreadInputStream::Read(void *ptr, size_t read_size)
std::rethrow_exception(postponed_exception);
auto r = buffer.Read();
- if (!r.IsEmpty()) {
+ if (!r.empty()) {
size_t nbytes = std::min(read_size, r.size);
memcpy(ptr, r.data, nbytes);
buffer.Consume(nbytes);