From 8830ea319fccdc4555add4ee16c7cdd62f1c1c57 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 4 Sep 2020 13:33:47 +0200 Subject: [PATCH] decoder/API: add `noexcept` --- src/decoder/DecoderAPI.cxx | 6 +++--- src/decoder/DecoderAPI.hxx | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/decoder/DecoderAPI.cxx b/src/decoder/DecoderAPI.cxx index a245989de..03f02b311 100644 --- a/src/decoder/DecoderAPI.cxx +++ b/src/decoder/DecoderAPI.cxx @@ -26,7 +26,7 @@ size_t decoder_read(DecoderClient *client, InputStream &is, - void *buffer, size_t length) + void *buffer, size_t length) noexcept { assert(buffer != nullptr); @@ -44,7 +44,7 @@ decoder_read(DecoderClient *client, bool decoder_read_full(DecoderClient *client, InputStream &is, - void *_buffer, size_t size) + void *_buffer, size_t size) noexcept { uint8_t *buffer = (uint8_t *)_buffer; @@ -61,7 +61,7 @@ decoder_read_full(DecoderClient *client, InputStream &is, } bool -decoder_skip(DecoderClient *client, InputStream &is, size_t size) +decoder_skip(DecoderClient *client, InputStream &is, size_t size) noexcept { while (size > 0) { char buffer[1024]; diff --git a/src/decoder/DecoderAPI.hxx b/src/decoder/DecoderAPI.hxx index 537e371cd..20959b456 100644 --- a/src/decoder/DecoderAPI.hxx +++ b/src/decoder/DecoderAPI.hxx @@ -65,11 +65,11 @@ class StopDecoder {}; */ size_t decoder_read(DecoderClient *decoder, InputStream &is, - void *buffer, size_t length); + void *buffer, size_t length) noexcept; static inline size_t decoder_read(DecoderClient &decoder, InputStream &is, - void *buffer, size_t length) + void *buffer, size_t length) noexcept { return decoder_read(&decoder, is, buffer, length); } @@ -83,7 +83,7 @@ decoder_read(DecoderClient &decoder, InputStream &is, */ bool decoder_read_full(DecoderClient *decoder, InputStream &is, - void *buffer, size_t size); + void *buffer, size_t size) noexcept; /** * Skip data on the #InputStream. @@ -91,6 +91,6 @@ decoder_read_full(DecoderClient *decoder, InputStream &is, * @return true on success, false on error or command */ bool -decoder_skip(DecoderClient *decoder, InputStream &is, size_t size); +decoder_skip(DecoderClient *decoder, InputStream &is, size_t size) noexcept; #endif