lib/pulse: add "noexcept"

This commit is contained in:
Max Kellermann 2017-11-12 18:25:16 +01:00
parent a92e0e8540
commit ff9759c09d
5 changed files with 6 additions and 6 deletions

View File

@ -25,7 +25,7 @@
#include <pulse/error.h>
std::runtime_error
MakePulseError(pa_context *context, const char *prefix)
MakePulseError(pa_context *context, const char *prefix) noexcept
{
const int e = pa_context_errno(context);
return FormatRuntimeError("%s: %s", prefix, pa_strerror(e));

View File

@ -25,6 +25,6 @@
struct pa_context;
std::runtime_error
MakePulseError(pa_context *context, const char *prefix);
MakePulseError(pa_context *context, const char *prefix) noexcept;
#endif

View File

@ -28,12 +28,12 @@ class LockGuard {
struct pa_threaded_mainloop *const mainloop;
public:
explicit LockGuard(struct pa_threaded_mainloop *_mainloop)
explicit LockGuard(struct pa_threaded_mainloop *_mainloop) noexcept
:mainloop(_mainloop) {
pa_threaded_mainloop_lock(mainloop);
}
~LockGuard() {
~LockGuard() noexcept {
pa_threaded_mainloop_unlock(mainloop);
}

View File

@ -26,7 +26,7 @@
#include <pulse/error.h>
void
LogPulseError(pa_context *context, const char *prefix)
LogPulseError(pa_context *context, const char *prefix) noexcept
{
const int e = pa_context_errno(context);
FormatError(pulse_domain, "%s: %s", prefix, pa_strerror(e));

View File

@ -23,6 +23,6 @@
struct pa_context;
void
LogPulseError(pa_context *context, const char *prefix);
LogPulseError(pa_context *context, const char *prefix) noexcept;
#endif