| commit | de2fc4187ae346aef11c6ee1e204a89ef03d3e5e | [log] [tgz] |
|---|---|---|
| author | Yuval Peress <peress@google.com> | Thu Apr 03 09:29:40 2025 -0700 |
| committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Apr 03 09:29:40 2025 -0700 |
| tree | 4830dbd9fb20c8828dfb8ecd8aea7273fe43244f | |
| parent | cc646fb3f6af61249949982cfe91447b4802ff13 [diff] |
pw_ring_buffer: Make iterator entry mutable Provide a distinction between iterator and const_iterator such that iterator contains a pw::ByteSpan buffer (mutable data) and const_iterator contains pw::ConstByteSpan buffer (const data). Enable copy constructors and stricter iterator equality checks: - Iterators not pointing to the end must also point to the same data in order to be considered equal. - Const iterators can be copied to other const iterators. - Const iterators cannot be copied to mutable iterators. - Mutable iterators can be copied to both mutable and const iterators. BUG: b/406109661 Change-Id: I890b7c30548ea9f9d0b033a1b2b1783c0ddf220a Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/280661 Reviewed-by: Aaron Green <aarongreen@google.com> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com> Pigweed-Auto-Submit: Yuval Peress <peress@google.com> Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.