aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include
diff options
context:
space:
mode:
authorLee *!* Clagett <code@leeclagett.com>2023-05-21 13:34:34 -0400
committerLee *!* Clagett <code@leeclagett.com>2023-05-21 13:35:18 -0400
commit2c98a82e7525fac098c6a9ebaf3e4be31a7f7392 (patch)
tree239103126d393e8a0bcd15f19f29cef6db62f36f /contrib/epee/include
parentMerge pull request #8842 (diff)
downloadmonero-2c98a82e7525fac098c6a9ebaf3e4be31a7f7392.tar.xz
Add byte_stream `value_type` and `data()`
Diffstat (limited to 'contrib/epee/include')
-rw-r--r--contrib/epee/include/byte_stream.h2
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_; }