diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2018-09-07 16:15:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-07 16:15:38 -0700 |
commit | f9d8138376765d229a32635c9209061e4e4aed8c (patch) | |
tree | 50719686fd7262f405c9bda8694d6c72e7c038b8 /src/google/protobuf/stubs/status_macros.h | |
parent | 2e7563f40ec7f901ae8ae1cc749d701fa07e211d (diff) | |
parent | e53be9bce4556cf0d13e24f1a25a7d75f663144f (diff) | |
download | protobuf-f9d8138376765d229a32635c9209061e4e4aed8c.tar.gz protobuf-f9d8138376765d229a32635c9209061e4e4aed8c.tar.bz2 protobuf-f9d8138376765d229a32635c9209061e4e4aed8c.zip |
Merge pull request #5109 from haberman/integrate
Down-integrate from google3.
Diffstat (limited to 'src/google/protobuf/stubs/status_macros.h')
-rw-r--r-- | src/google/protobuf/stubs/status_macros.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/google/protobuf/stubs/status_macros.h b/src/google/protobuf/stubs/status_macros.h index 743e79a7..b3af0dcd 100644 --- a/src/google/protobuf/stubs/status_macros.h +++ b/src/google/protobuf/stubs/status_macros.h @@ -46,11 +46,11 @@ namespace util { // // Example: // RETURN_IF_ERROR(DoThings(4)); -#define RETURN_IF_ERROR(expr) \ - do { \ +#define RETURN_IF_ERROR(expr) \ + do { \ /* Using _status below to avoid capture problems if expr is "status". */ \ - const ::google::protobuf::util::Status _status = (expr); \ - if (GOOGLE_PREDICT_FALSE(!_status.ok())) return _status; \ + const ::google::protobuf::util::Status _status = (expr); \ + if (PROTOBUF_PREDICT_FALSE(!_status.ok())) return _status; \ } while (0) // Internal helper for concatenating macro values. @@ -67,7 +67,7 @@ Status DoAssignOrReturn(T& lhs, StatusOr<T> result) { #define ASSIGN_OR_RETURN_IMPL(status, lhs, rexpr) \ Status status = DoAssignOrReturn(lhs, (rexpr)); \ - if (GOOGLE_PREDICT_FALSE(!status.ok())) return status; + if (PROTOBUF_PREDICT_FALSE(!status.ok())) return status; // Executes an expression that returns a util::StatusOr, extracting its value // into the variable defined by lhs (or returning on error). |