encoder/interface: make Read() noexcept (all implementations are)

This commit is contained in:
Max Kellermann
2022-07-12 10:04:17 +02:00
parent 31d89b36cf
commit e861d4f83d
5 changed files with 8 additions and 14 deletions

View File

@@ -102,7 +102,7 @@ public:
* @param length the maximum length of the destination buffer
* @return the number of bytes written to #dest
*/
virtual std::size_t Read(void *dest, std::size_t length) = 0;
virtual std::size_t Read(void *dest, std::size_t length) noexcept = 0;
};
class PreparedEncoder {

View File

@@ -33,7 +33,7 @@ public:
buffer.Append({(const std::byte *)data, length});
}
size_t Read(void *dest, size_t length) override {
size_t Read(void *dest, size_t length) noexcept override {
return buffer.Read((std::byte *)dest, length);
}
};