-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Commit-Queue: Aaron Green <[email protected]> Reviewed-by: Taylor Cramer <[email protected]> Pigweed-Auto-Submit: Aaron Green <[email protected]> Lint: Lint 🤖 <[email protected]>
- Loading branch information
1 parent
6417a52
commit f43ca4f
Showing
30 changed files
with
916 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.