Imported Upstream version 3.8.0
[platform/upstream/protobuf.git] / src / google / protobuf / stubs / status_macros.h
index 743e79a..0c64317 100644 (file)
@@ -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 PROTOBUF_NAMESPACE_ID::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).