lib/pulse: add "noexcept"
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
#include <pulse/error.h>
|
#include <pulse/error.h>
|
||||||
|
|
||||||
std::runtime_error
|
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);
|
const int e = pa_context_errno(context);
|
||||||
return FormatRuntimeError("%s: %s", prefix, pa_strerror(e));
|
return FormatRuntimeError("%s: %s", prefix, pa_strerror(e));
|
||||||
|
@@ -25,6 +25,6 @@
|
|||||||
struct pa_context;
|
struct pa_context;
|
||||||
|
|
||||||
std::runtime_error
|
std::runtime_error
|
||||||
MakePulseError(pa_context *context, const char *prefix);
|
MakePulseError(pa_context *context, const char *prefix) noexcept;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -28,12 +28,12 @@ class LockGuard {
|
|||||||
struct pa_threaded_mainloop *const mainloop;
|
struct pa_threaded_mainloop *const mainloop;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit LockGuard(struct pa_threaded_mainloop *_mainloop)
|
explicit LockGuard(struct pa_threaded_mainloop *_mainloop) noexcept
|
||||||
:mainloop(_mainloop) {
|
:mainloop(_mainloop) {
|
||||||
pa_threaded_mainloop_lock(mainloop);
|
pa_threaded_mainloop_lock(mainloop);
|
||||||
}
|
}
|
||||||
|
|
||||||
~LockGuard() {
|
~LockGuard() noexcept {
|
||||||
pa_threaded_mainloop_unlock(mainloop);
|
pa_threaded_mainloop_unlock(mainloop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
#include <pulse/error.h>
|
#include <pulse/error.h>
|
||||||
|
|
||||||
void
|
void
|
||||||
LogPulseError(pa_context *context, const char *prefix)
|
LogPulseError(pa_context *context, const char *prefix) noexcept
|
||||||
{
|
{
|
||||||
const int e = pa_context_errno(context);
|
const int e = pa_context_errno(context);
|
||||||
FormatError(pulse_domain, "%s: %s", prefix, pa_strerror(e));
|
FormatError(pulse_domain, "%s: %s", prefix, pa_strerror(e));
|
||||||
|
@@ -23,6 +23,6 @@
|
|||||||
struct pa_context;
|
struct pa_context;
|
||||||
|
|
||||||
void
|
void
|
||||||
LogPulseError(pa_context *context, const char *prefix);
|
LogPulseError(pa_context *context, const char *prefix) noexcept;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user