mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-20 22:00:58 +00:00
pw_stream: Make MemoryWriter::data() non-const
Allows mutable access to a MemoryWriter's underlying buffer. No-Docs-Update-Reason: Changing a data() accessor to non-const. Change-Id: I02a1c21e670ba63f6de98441a851eddc03095cf5 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/45001 Reviewed-by: Wyatt Hepler <hepler@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com> Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com>
This commit is contained in:
parent
6230fa19cc
commit
dc51315530
|
@ -35,6 +35,7 @@ class MemoryWriter : public Writer {
|
|||
|
||||
ConstByteSpan WrittenData() const { return dest_.first(bytes_written_); }
|
||||
|
||||
std::byte* data() { return dest_.data(); }
|
||||
const std::byte* data() const { return dest_.data(); }
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue
Block a user