*: add lost of "noexcept" specifications
This commit is contained in:
@@ -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(io_thread_inside());
|
||||
|
||||
@@ -141,7 +141,7 @@ AsyncInputStream::Seek(offset_type new_offset)
|
||||
}
|
||||
|
||||
void
|
||||
AsyncInputStream::SeekDone()
|
||||
AsyncInputStream::SeekDone() noexcept
|
||||
{
|
||||
assert(io_thread_inside());
|
||||
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)
|
||||
|
@@ -92,15 +92,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;
|
||||
}
|
||||
|
||||
@@ -109,15 +109,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();
|
||||
}
|
||||
|
||||
@@ -125,21 +125,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
|
||||
@@ -154,7 +154,7 @@ protected:
|
||||
*/
|
||||
virtual void DoSeek(offset_type new_offset) = 0;
|
||||
|
||||
bool IsSeekPending() const {
|
||||
bool IsSeekPending() const noexcept {
|
||||
return seek_state == SeekState::PENDING;
|
||||
}
|
||||
|
||||
@@ -162,14 +162,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
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user