diff options
author | Max Kellermann <max@musicpd.org> | 2018-12-28 17:15:28 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-12-28 17:15:28 +0100 |
commit | c0d8a9b07acd0b396fa1462468ae2fb553ef05f8 (patch) | |
tree | 321a14ecb252bc65a59d4d03a2661daa708495d6 | |
parent | 5b0d23d5532bc9a7289a739012abafbef94e205b (diff) |
output/httpd/Page: add `noexcept`
-rw-r--r-- | src/output/plugins/httpd/Page.cxx | 2 | ||||
-rw-r--r-- | src/output/plugins/httpd/Page.hxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/output/plugins/httpd/Page.cxx b/src/output/plugins/httpd/Page.cxx index b6120fced..6a6f37e0b 100644 --- a/src/output/plugins/httpd/Page.cxx +++ b/src/output/plugins/httpd/Page.cxx @@ -21,7 +21,7 @@ #include <string.h> -Page::Page(const void *data, size_t size) +Page::Page(const void *data, size_t size) noexcept :buffer(size) { memcpy(&buffer.front(), data, size); diff --git a/src/output/plugins/httpd/Page.hxx b/src/output/plugins/httpd/Page.hxx index 3e6ce3474..b04901e25 100644 --- a/src/output/plugins/httpd/Page.hxx +++ b/src/output/plugins/httpd/Page.hxx @@ -36,17 +36,17 @@ class Page { AllocatedArray<uint8_t> buffer; public: - explicit Page(size_t _size):buffer(_size) {} - explicit Page(AllocatedArray<uint8_t> &&_buffer) + explicit Page(size_t _size) noexcept:buffer(_size) {} + explicit Page(AllocatedArray<uint8_t> &&_buffer) noexcept :buffer(std::move(_buffer)) {} - Page(const void *data, size_t size); + Page(const void *data, size_t size) noexcept; - size_t GetSize() const { + size_t GetSize() const noexcept { return buffer.size(); } - const uint8_t *GetData() const { + const uint8_t *GetData() const noexcept { return &buffer.front(); } }; |