From e10b15010c9da0aba6f77e5ca109ab7571c2ce4b Mon Sep 17 00:00:00 2001
From: Max Kellermann <max.kellermann@gmail.com>
Date: Fri, 1 Jul 2022 11:15:42 +0200
Subject: [PATCH] decoder/OpusReader: add `noexcept`

---
 src/decoder/plugins/OpusReader.hxx | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/decoder/plugins/OpusReader.hxx b/src/decoder/plugins/OpusReader.hxx
index 1cd499a9e..cb8a1229b 100644
--- a/src/decoder/plugins/OpusReader.hxx
+++ b/src/decoder/plugins/OpusReader.hxx
@@ -31,27 +31,27 @@ class OpusReader {
 	const uint8_t *p, *const end;
 
 public:
-	OpusReader(const void *_p, size_t size)
+	constexpr OpusReader(const void *_p, size_t size) noexcept
 		:p((const uint8_t *)_p), end(p + size) {}
 
-	bool Skip(size_t length) {
+	constexpr bool Skip(size_t length) noexcept {
 		p += length;
 		return p <= end;
 	}
 
-	const void *Read(size_t length) {
+	constexpr const void *Read(size_t length) noexcept {
 		const uint8_t *result = p;
 		return Skip(length)
 			? result
 			: nullptr;
 	}
 
-	bool Expect(const void *value, size_t length) {
+	bool Expect(const void *value, size_t length) noexcept {
 		const void *data = Read(length);
 		return data != nullptr && memcmp(value, data, length) == 0;
 	}
 
-	bool ReadByte(uint8_t &value_r) {
+	constexpr bool ReadByte(uint8_t &value_r) noexcept {
 		if (p >= end)
 			return false;
 
@@ -59,7 +59,7 @@ public:
 		return true;
 	}
 
-	bool ReadShort(uint16_t &value_r) {
+	constexpr bool ReadShort(uint16_t &value_r) noexcept {
 		const uint8_t *value = (const uint8_t *)Read(sizeof(value_r));
 		if (value == nullptr)
 			return false;
@@ -68,7 +68,7 @@ public:
 		return true;
 	}
 
-	bool ReadWord(uint32_t &value_r) {
+	constexpr bool ReadWord(uint32_t &value_r) noexcept {
 		const uint8_t *value = (const uint8_t *)Read(sizeof(value_r));
 		if (value == nullptr)
 			return false;
@@ -78,12 +78,12 @@ public:
 		return true;
 	}
 
-	bool SkipString() {
+	constexpr bool SkipString() noexcept {
 		uint32_t length;
 		return ReadWord(length) && Skip(length);
 	}
 
-	StringView ReadString() {
+	constexpr StringView ReadString() noexcept {
 		uint32_t length;
 		if (!ReadWord(length))
 			return nullptr;