diff options
author | Chris Robinson <[email protected]> | 2019-10-09 03:29:25 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-10-09 03:29:25 -0700 |
commit | b687e952efa7407e323e8465df41e2e84b277b31 (patch) | |
tree | aa2272b383366a2c37c9663e498ea1bc158a8984 /alc/backends/sdl2.cpp | |
parent | a7c12453600d4e9ae756b933770c6f42977a2663 (diff) |
Make C callbacks noexcept
No telling what would happen if exceptions managed to get back into presumably
C-based callers.
Diffstat (limited to 'alc/backends/sdl2.cpp')
-rw-r--r-- | alc/backends/sdl2.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/alc/backends/sdl2.cpp b/alc/backends/sdl2.cpp index 4cdf05b4..25b5d4d9 100644 --- a/alc/backends/sdl2.cpp +++ b/alc/backends/sdl2.cpp @@ -52,8 +52,8 @@ struct Sdl2Backend final : public BackendBase { Sdl2Backend(ALCdevice *device) noexcept : BackendBase{device} { } ~Sdl2Backend() override; - void audioCallback(Uint8 *stream, int len); - static void audioCallbackC(void *ptr, Uint8 *stream, int len) + void audioCallback(Uint8 *stream, int len) noexcept; + static void audioCallbackC(void *ptr, Uint8 *stream, int len) noexcept { static_cast<Sdl2Backend*>(ptr)->audioCallback(stream, len); } void open(const ALCchar *name) override; @@ -81,7 +81,7 @@ Sdl2Backend::~Sdl2Backend() mDeviceID = 0; } -void Sdl2Backend::audioCallback(Uint8 *stream, int len) +void Sdl2Backend::audioCallback(Uint8 *stream, int len) noexcept { const auto ulen = static_cast<unsigned int>(len); assert((ulen % mFrameSize) == 0); |