From bc6640156600e88e20813a0539ff1cbc7dd9ac3a Mon Sep 17 00:00:00 2001 From: minqiyang Date: Fri, 21 Dec 2018 16:08:06 +0800 Subject: [PATCH] Polish code test=develop --- paddle/fluid/platform/enforce.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/paddle/fluid/platform/enforce.h b/paddle/fluid/platform/enforce.h index d1dd09f2064..78e8fbc51d3 100644 --- a/paddle/fluid/platform/enforce.h +++ b/paddle/fluid/platform/enforce.h @@ -260,19 +260,19 @@ inline void throw_on_error(T e) { #define PADDLE_JUDGE -#define __PADDLE_UNARY_COMPARE(COND, ...) \ - do { \ - auto __cond = COND; \ - if (UNLIKELY(::paddle::platform::is_error(__cond))) { \ - ::paddle::platform::throw_on_error(__cond, ##__VA_ARGS__); \ - } \ +#define __PADDLE_UNARY_COMPARE(COND, ...) \ + do { \ + auto __cond = COND; \ + if (UNLIKELY(::paddle::platform::is_error(__cond))) { \ + ::paddle::platform::throw_on_error(__cond, ##__VA_ARGS__); /* NOLINT */ \ + } \ } while (0) #ifndef REPLACE_ENFORCE_GLOG #define PADDLE_ENFORCE(COND, ...) \ do { \ try { \ - __PADDLE_UNARY_COMPARE(COND, ##__VA_ARGS__); \ + __PADDLE_UNARY_COMPARE(COND, ##__VA_ARGS__); /* NOLINT */ \ } catch (...) { \ throw ::paddle::platform::EnforceNotMet(std::current_exception(), \ __FILE__, __LINE__); \ -- GitLab