pw_status: Use new functions instead of variables

Run python -m pw_status.update_style to migrate to the new
Status::Code() functions from the Status::CODE variables.

Change-Id: I8757cf1f46586c04cd822c01f9868de7d3ea0583
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/24481
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
diff --git a/pw_protobuf/decoder.cc b/pw_protobuf/decoder.cc
index 332f49a..813046c 100644
--- a/pw_protobuf/decoder.cc
+++ b/pw_protobuf/decoder.cc
@@ -242,7 +242,7 @@
   // Iterate the proto, calling the handler with each field number.
   while (state_ == kDecodeInProgress) {
     if (Status status = decoder_.Next(); !status.ok()) {
-      if (status == Status::OutOfRange()) {
+      if (status.IsOutOfRange()) {
         // Reached the end of the proto.
         break;
       }
@@ -253,7 +253,7 @@
 
     Status status = handler_->ProcessField(*this, decoder_.FieldNumber());
     if (!status.ok()) {
-      state_ = status == Status::Cancelled() ? kDecodeCancelled : kDecodeFailed;
+      state_ = status.IsCancelled() ? kDecodeCancelled : kDecodeFailed;
       return status;
     }