input/thread: add "noexcept"
This commit is contained in:
parent
30832ab33a
commit
e0a09dbd69
|
@ -27,7 +27,7 @@
|
|||
ThreadInputStream::ThreadInputStream(const char *_plugin,
|
||||
const char *_uri,
|
||||
Mutex &_mutex, Cond &_cond,
|
||||
size_t _buffer_size)
|
||||
size_t _buffer_size) noexcept
|
||||
:InputStream(_uri, _mutex, _cond),
|
||||
plugin(_plugin),
|
||||
thread(BIND_THIS_METHOD(ThreadFunc)),
|
||||
|
@ -37,7 +37,7 @@ ThreadInputStream::ThreadInputStream(const char *_plugin,
|
|||
allocation.ForkCow(false);
|
||||
}
|
||||
|
||||
ThreadInputStream::~ThreadInputStream()
|
||||
ThreadInputStream::~ThreadInputStream() noexcept
|
||||
{
|
||||
{
|
||||
const std::lock_guard<Mutex> lock(mutex);
|
||||
|
@ -58,8 +58,8 @@ ThreadInputStream::Start()
|
|||
thread.Start();
|
||||
}
|
||||
|
||||
void
|
||||
ThreadInputStream::ThreadFunc()
|
||||
inline void
|
||||
ThreadInputStream::ThreadFunc() noexcept
|
||||
{
|
||||
FormatThreadName("input:%s", plugin);
|
||||
|
||||
|
|
|
@ -71,9 +71,9 @@ class ThreadInputStream : public InputStream {
|
|||
public:
|
||||
ThreadInputStream(const char *_plugin,
|
||||
const char *_uri, Mutex &_mutex, Cond &_cond,
|
||||
size_t _buffer_size);
|
||||
size_t _buffer_size) noexcept;
|
||||
|
||||
virtual ~ThreadInputStream();
|
||||
virtual ~ThreadInputStream() noexcept;
|
||||
|
||||
/**
|
||||
* Initialize the object and start the thread.
|
||||
|
@ -87,7 +87,7 @@ public:
|
|||
size_t Read(void *ptr, size_t size) override final;
|
||||
|
||||
protected:
|
||||
void SetMimeType(const char *_mime) {
|
||||
void SetMimeType(const char *_mime) noexcept {
|
||||
assert(thread.IsInside());
|
||||
|
||||
InputStream::SetMimeType(_mime);
|
||||
|
@ -124,7 +124,7 @@ protected:
|
|||
*
|
||||
* The #InputStream is not locked.
|
||||
*/
|
||||
virtual void Close() {}
|
||||
virtual void Close() noexcept {}
|
||||
|
||||
/**
|
||||
* Called from the client thread to cancel a Read() inside the
|
||||
|
@ -132,10 +132,10 @@ protected:
|
|||
*
|
||||
* The #InputStream is not locked.
|
||||
*/
|
||||
virtual void Cancel() {}
|
||||
virtual void Cancel() noexcept {}
|
||||
|
||||
private:
|
||||
void ThreadFunc();
|
||||
void ThreadFunc() noexcept;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,7 @@ protected:
|
|||
virtual void Open() override;
|
||||
virtual size_t ThreadRead(void *ptr, size_t size) override;
|
||||
|
||||
void Close() override {
|
||||
void Close() noexcept override {
|
||||
mmsx_close(mms);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue