-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use `riegeli::SharedPtr` instead of `std::shared_ptr`. Do not convert it from `std::unique_ptr`: `riegeli::SharedPtr` always allocates the control block together with the object, hence this is not supported, and this is more efficient anyway. Utilize CTAD more. Let `MaskedReader` constructor take `riegeli::Reader&` instead of `std::unique_ptr<riegeli::Reader>`. There is no ownership transfer, the `riegeli::Reader` is accessed only during construction. Use `riegeli::SharedBuffer` instead of `std::shared_ptr<std::string>` in `MaskedReader`. It has fewer indirections. It does not track the exact size but this is not needed here. Use defaulted move constructor and move assignment of `MaskedReader`. They do the right thing. Add `MaskedReader::Reset()` to reset the instance to a state equivalent to a newly constructed state in-place. Use `std::optional` instead of `absl::optional`. Use `std::optional` or storing the value directly instead of `std::unique_ptr` when movability is not needed. PiperOrigin-RevId: 694608145
- Loading branch information
1 parent
4ea151d
commit 6e7c29b
Showing
11 changed files
with
138 additions
and
142 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
Oops, something went wrong.