Commit 6f04b223 authored by Max Kellermann's avatar Max Kellermann

output/httpd/Page: use std::byte

parent 8d90b831
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "util/AllocatedArray.hxx" #include "util/AllocatedArray.hxx"
#include <cstddef> #include <cstddef>
#include <cstdint>
#include <memory> #include <memory>
/** /**
...@@ -32,11 +31,11 @@ ...@@ -32,11 +31,11 @@
* several instances hold references to one buffer. * several instances hold references to one buffer.
*/ */
class Page { class Page {
AllocatedArray<uint8_t> buffer; AllocatedArray<std::byte> buffer;
public: public:
explicit Page(size_t _size) noexcept:buffer(_size) {} explicit Page(size_t _size) noexcept:buffer(_size) {}
explicit Page(AllocatedArray<uint8_t> &&_buffer) noexcept explicit Page(AllocatedArray<std::byte> &&_buffer) noexcept
:buffer(std::move(_buffer)) {} :buffer(std::move(_buffer)) {}
Page(const void *data, size_t size) noexcept; Page(const void *data, size_t size) noexcept;
...@@ -45,7 +44,7 @@ public: ...@@ -45,7 +44,7 @@ public:
return buffer.size(); return buffer.size();
} }
const uint8_t *GetData() const noexcept { const std::byte *GetData() const noexcept {
return &buffer.front(); return &buffer.front();
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment