summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-06-04 12:57:05 +0200
committerMax Kellermann <max@musicpd.org>2017-06-04 12:57:05 +0200
commit979f1b6c39b64770f42ed125c0abf80f4938fdb5 (patch)
tree3d254376552957afc6c6c77661a60954a83e41ce /src/input
parent1fa1790da5a7fb1bd4a5deef36b7ed8d9c60acbc (diff)
parentcf86dfd3178bcdffbb2968cda4ad9c271ffdc4f3 (diff)
Merge tag 'v0.20.9'
release v0.20.9
Diffstat (limited to 'src/input')
-rw-r--r--src/input/AsyncInputStream.cxx14
-rw-r--r--src/input/AsyncInputStream.hxx30
-rw-r--r--src/input/InputStream.hxx18
3 files changed, 31 insertions, 31 deletions
diff --git a/src/input/AsyncInputStream.cxx b/src/input/AsyncInputStream.cxx
index daf63faf1..ec28e8bc8 100644
--- a/src/input/AsyncInputStream.cxx
+++ b/src/input/AsyncInputStream.cxx
@@ -52,14 +52,14 @@ AsyncInputStream::~AsyncInputStream()
}
void
-AsyncInputStream::SetTag(Tag *_tag)
+AsyncInputStream::SetTag(Tag *_tag) noexcept
{
delete tag;
tag = _tag;
}
void
-AsyncInputStream::Pause()
+AsyncInputStream::Pause() noexcept
{
assert(GetEventLoop().IsInside());
@@ -141,7 +141,7 @@ AsyncInputStream::Seek(offset_type new_offset)
}
void
-AsyncInputStream::SeekDone()
+AsyncInputStream::SeekDone() noexcept
{
assert(GetEventLoop().IsInside());
assert(IsSeekPending());
@@ -201,7 +201,7 @@ AsyncInputStream::Read(void *ptr, size_t read_size)
}
void
-AsyncInputStream::CommitWriteBuffer(size_t nbytes)
+AsyncInputStream::CommitWriteBuffer(size_t nbytes) noexcept
{
buffer.Append(nbytes);
@@ -212,7 +212,7 @@ AsyncInputStream::CommitWriteBuffer(size_t nbytes)
}
void
-AsyncInputStream::AppendToBuffer(const void *data, size_t append_size)
+AsyncInputStream::AppendToBuffer(const void *data, size_t append_size) noexcept
{
auto w = buffer.Write();
assert(!w.IsEmpty());
@@ -238,7 +238,7 @@ AsyncInputStream::AppendToBuffer(const void *data, size_t append_size)
}
void
-AsyncInputStream::DeferredResume()
+AsyncInputStream::DeferredResume() noexcept
{
const std::lock_guard<Mutex> protect(mutex);
@@ -251,7 +251,7 @@ AsyncInputStream::DeferredResume()
}
void
-AsyncInputStream::DeferredSeek()
+AsyncInputStream::DeferredSeek() noexcept
{
const std::lock_guard<Mutex> protect(mutex);
if (seek_state != SeekState::SCHEDULED)
diff --git a/src/input/AsyncInputStream.hxx b/src/input/AsyncInputStream.hxx
index 29fea5406..e986f623b 100644
--- a/src/input/AsyncInputStream.hxx
+++ b/src/input/AsyncInputStream.hxx
@@ -96,15 +96,15 @@ protected:
/**
* Pass an tag from the I/O thread to the client thread.
*/
- void SetTag(Tag *_tag);
+ void SetTag(Tag *_tag) noexcept;
- void ClearTag() {
+ void ClearTag() noexcept {
SetTag(nullptr);
}
- void Pause();
+ void Pause() noexcept;
- bool IsPaused() const {
+ bool IsPaused() const noexcept {
return paused;
}
@@ -113,15 +113,15 @@ protected:
* continue feeding Read() calls from the buffer until it runs
* empty.
*/
- void SetClosed() {
+ void SetClosed() noexcept {
open = false;
}
- bool IsBufferEmpty() const {
+ bool IsBufferEmpty() const noexcept {
return buffer.IsEmpty();
}
- bool IsBufferFull() const {
+ bool IsBufferFull() const noexcept {
return buffer.IsFull();
}
@@ -129,21 +129,21 @@ protected:
* Determine how many bytes can be added to the buffer.
*/
gcc_pure
- size_t GetBufferSpace() const {
+ size_t GetBufferSpace() const noexcept {
return buffer.GetSpace();
}
- CircularBuffer<uint8_t>::Range PrepareWriteBuffer() {
+ CircularBuffer<uint8_t>::Range PrepareWriteBuffer() noexcept {
return buffer.Write();
}
- void CommitWriteBuffer(size_t nbytes);
+ void CommitWriteBuffer(size_t nbytes) noexcept;
/**
* Append data to the buffer. The size must fit into the
* buffer; see GetBufferSpace().
*/
- void AppendToBuffer(const void *data, size_t append_size);
+ void AppendToBuffer(const void *data, size_t append_size) noexcept;
/**
* Implement code here that will resume the stream after it
@@ -158,7 +158,7 @@ protected:
*/
virtual void DoSeek(offset_type new_offset) = 0;
- bool IsSeekPending() const {
+ bool IsSeekPending() const noexcept {
return seek_state == SeekState::PENDING;
}
@@ -166,14 +166,14 @@ protected:
* Call this after seeking has finished. It will notify the
* client thread.
*/
- void SeekDone();
+ void SeekDone() noexcept;
private:
void Resume();
/* for DeferredCall */
- void DeferredResume();
- void DeferredSeek();
+ void DeferredResume() noexcept;
+ void DeferredSeek() noexcept;
};
#endif
diff --git a/src/input/InputStream.hxx b/src/input/InputStream.hxx
index 86f19f094..b5237ee4b 100644
--- a/src/input/InputStream.hxx
+++ b/src/input/InputStream.hxx
@@ -184,20 +184,20 @@ public:
void LockWaitReady();
gcc_pure
- bool HasMimeType() const {
+ bool HasMimeType() const noexcept {
assert(ready);
return !mime.empty();
}
gcc_pure
- const char *GetMimeType() const {
+ const char *GetMimeType() const noexcept {
assert(ready);
return mime.empty() ? nullptr : mime.c_str();
}
- void ClearMimeType() {
+ void ClearMimeType() noexcept {
mime.clear();
}
@@ -215,35 +215,35 @@ public:
}
gcc_pure
- bool KnownSize() const {
+ bool KnownSize() const noexcept {
assert(ready);
return size != UNKNOWN_SIZE;
}
gcc_pure
- offset_type GetSize() const {
+ offset_type GetSize() const noexcept {
assert(ready);
assert(KnownSize());
return size;
}
- void AddOffset(offset_type delta) {
+ void AddOffset(offset_type delta) noexcept {
assert(ready);
offset += delta;
}
gcc_pure
- offset_type GetOffset() const {
+ offset_type GetOffset() const noexcept {
assert(ready);
return offset;
}
gcc_pure
- offset_type GetRest() const {
+ offset_type GetRest() const noexcept {
assert(ready);
assert(KnownSize());
@@ -251,7 +251,7 @@ public:
}
gcc_pure
- bool IsSeekable() const {
+ bool IsSeekable() const noexcept {
assert(ready);
return seekable;