commit | f43ca4f59c194ded529de2ccc28bf6bea6ffa71c | [log] [tgz] |
---|---|---|
author | Aaron Green <aarongreen@google.com> | Mon Nov 18 16:17:25 2024 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Nov 18 16:17:25 2024 +0000 |
tree | 639873e2878071a8b8886441a1a481aaaaf92bcd | |
parent | 6417a523b06e03dce3453e96c3a1bec6ab511768 [diff] |
pw_allocator: Use move-semantics for Block API Several Block methods consume a block pointer and return a replacement. Previously, this was accomplished by having static methods that took an l-value reference to a Block pointer that was modified in place. It was noted in pwrev/235312 that this API is potentially confusing, and recommended consuming the pointers as rvalue references and returning new pointers. This makes it clearer when a pointer is being consumed, and allows the compiler to catch bugs like using a moved-from pointer. Change-Id: I7b8d51da58b7a7195e43d840871b31d5f965d84c Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/242633 Docs-Not-Needed: Aaron Green <aarongreen@google.com> Commit-Queue: Aaron Green <aarongreen@google.com> Reviewed-by: Taylor Cramer <cramertj@google.com> Pigweed-Auto-Submit: Aaron Green <aarongreen@google.com> Lint: Lint 🤖 <android-build-ayeaye@system.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/.