diff options
author | luigi1111 <luigi1111w@gmail.com> | 2023-06-27 11:45:25 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2023-06-27 11:45:25 -0500 |
commit | 1261f0ac091479b4e2f7fb2109564f0e42478f05 (patch) | |
tree | 95872b22ef7400fc8ba91c8ad52a32a1d875fd3b /contrib | |
parent | Merge pull request #8862 (diff) | |
parent | Add byte_stream `value_type` and `data()` (diff) | |
download | monero-1261f0ac091479b4e2f7fb2109564f0e42478f05.tar.xz |
Merge pull request #8869
2c98a82 Add byte_stream alue_type and data() (Lee *!* Clagett)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/epee/include/byte_stream.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/epee/include/byte_stream.h b/contrib/epee/include/byte_stream.h index 4f565326a..0904f9aa1 100644 --- a/contrib/epee/include/byte_stream.h +++ b/contrib/epee/include/byte_stream.h @@ -74,6 +74,7 @@ namespace epee public: using char_type = std::uint8_t; using Ch = char_type; + using value_type = char_type; //! Increase internal buffer by at least `byte_stream_increase` bytes. byte_stream() noexcept @@ -86,6 +87,7 @@ namespace epee ~byte_stream() noexcept = default; byte_stream& operator=(byte_stream&& rhs) noexcept; + std::uint8_t* data() noexcept { return buffer_.get(); } const std::uint8_t* data() const noexcept { return buffer_.get(); } std::uint8_t* tellp() const noexcept { return next_write_; } std::size_t available() const noexcept { return end_ - next_write_; } |