output/httpd/Page: add `noexcept`

This commit is contained in:
Max Kellermann 2018-12-28 17:15:28 +01:00
parent 5b0d23d553
commit c0d8a9b07a
2 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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();
}
};