- Remove TRY* short name macros and switch existing use to PW_TRY*
- Make PW_TRY macros use constexpr rather than inline internally.
Change-Id: Ia86071183c76568241425ae8b5eafec8313fc133
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/18165
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: David Rogers <davidrogers@google.com>
- Add TRY macros to status module (they are moving from pw_kvs).
- Switch pw_kvs to use pw_status/try.
- Remove TRY macros from pw_kvs.
Change-Id: I72c844f4a452c80d8053cb0cf64b0dd88e891367
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/18040
Commit-Queue: David Rogers <davidrogers@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Replace pw::span with std::span and "pw_span/span.h" with <span>
throughout the codebase.
Change-Id: Ib1fa873168b6093794e861611d750fcad6285d6c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/12801
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Define AlignedWriter::Write overload that reads into the internal buffer
from an Input and writes it aligned to the output.
Change-Id: I72c1dead8cdcb912bf44fd1e36940cdb741f92df
- Update AlignedWriter to prevent writing after an error occurs.
- Ensure that the number of written bytes is always returned for
AlignedWriter errors.
- Remove FlashError::Mode, since the number of bytes affected should
always be set.
- Add tests to alignment_test.cc and key_value_store.cc to cover
failures during AlignedWrite.
- Update some comments.
Change-Id: Id62f1564b3641be0aeb7f799f0fa0538a1b5b09e
- Disallow implicit conversions between Status and StatusWithSize, which
can be problematic.
- Add TRY_WITH_SIZE to pw_kvs to handle returning StatusWithSize from
functions.
- Make zero the default size argument for StatusWithSize.
- Expand tests for StatusWithSize.
Change-Id: Ia1c36e5a39402a50138d93e89afbaa5e772adb8a
- Define the Output interface.
- Create AlignedWriter class, which handles writing aligned and padded
data to a buffer.
- Define AlignedWriterBuffer, which provides a buffer to an
AlignedWriter.
Change-Id: I791c5fc2d47617b0866fa779a506cb977905f245