commit | dc51315530070a395300695c50b172c4fdce6deb | [log] [tgz] |
---|---|---|
author | Armando Montanez <amontanez@google.com> | Wed May 12 13:11:30 2021 -0700 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed May 12 22:00:43 2021 +0000 |
tree | 4d6f0235a6ad55fee14cd94e0ed361c8c5b52984 | |
parent | 6230fa19cc8625fa968435e71a297f5e8b448845 [diff] |
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>
diff --git a/pw_stream/public/pw_stream/memory_stream.h b/pw_stream/public/pw_stream/memory_stream.h index 84d9f5d..1ccf9ab 100644 --- a/pw_stream/public/pw_stream/memory_stream.h +++ b/pw_stream/public/pw_stream/memory_stream.h
@@ -35,6 +35,7 @@ ConstByteSpan WrittenData() const { return dest_.first(bytes_written_); } + std::byte* data() { return dest_.data(); } const std::byte* data() const { return dest_.data(); } private: