diff options
author | Wyatt Hepler <hepler@google.com> | 2021-01-07 13:26:57 -0800 |
---|---|---|
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2021-01-11 20:28:12 +0000 |
commit | 1b3da3a983ecaaf84090a0b1542ac23e04e5f6b7 (patch) | |
tree | 7f805f6ee43f2e51f2e333143911c2fbdafe249d /pw_string/public | |
parent | 5a53dfd1af13128918edf4c0491d078472c97654 (diff) | |
download | pigweed-1b3da3a983ecaaf84090a0b1542ac23e04e5f6b7.tar.gz |
pw_status: Replace Status::Ok() with OkStatus()
- Mark Status::Ok() and StatusWithSize::Ok() as deprecated.
- Replace Status::Ok() with OkStatus().
- Replace StatusWithSize::Ok() with StatusWithSize().
Change-Id: If7192282446bf6d7f90990bb0b4f1b1b89a9228a
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/29003
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Keir Mierle <keir@google.com>
Diffstat (limited to 'pw_string/public')
-rw-r--r-- | pw_string/public/pw_string/format.h | 2 | ||||
-rw-r--r-- | pw_string/public/pw_string/string_builder.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/pw_string/public/pw_string/format.h b/pw_string/public/pw_string/format.h index f3aa337f8..9499eb23a 100644 --- a/pw_string/public/pw_string/format.h +++ b/pw_string/public/pw_string/format.h @@ -35,7 +35,7 @@ namespace pw::string { // // The status is // -// Status::Ok() if the operation succeeded, +// OkStatus() if the operation succeeded, // Status::ResourceExhausted() if the buffer was too small to fit the output, // Status::InvalidArgument() if there was a formatting error. // diff --git a/pw_string/public/pw_string/string_builder.h b/pw_string/public/pw_string/string_builder.h index 425fbfb63..7d2c5a432 100644 --- a/pw_string/public/pw_string/string_builder.h +++ b/pw_string/public/pw_string/string_builder.h @@ -135,7 +135,7 @@ class StringBuilder { // The status from the last operation. May be OK while status() is not OK. Status last_status() const { return last_status_; } - // True if status() is Status::Ok(). + // True if status() is OkStatus(). bool ok() const { return status_.ok(); } // True if the string is empty. @@ -150,10 +150,10 @@ class StringBuilder { // Clears the string and resets its error state. void clear(); - // Sets the statuses to Status::Ok(); + // Sets the statuses to OkStatus(); void clear_status() { - status_ = Status::Ok(); - last_status_ = Status::Ok(); + status_ = OkStatus(); + last_status_ = OkStatus(); } // Appends a single character. Stets the status to RESOURCE_EXHAUSTED if the |