From a3fa3f85d7bd4fb948b0401d77d5c60498e5a329 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Tue, 18 Dec 2018 15:04:26 +0800 Subject: [PATCH] Polish code test=develop --- paddle/fluid/platform/enforce.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/platform/enforce.h b/paddle/fluid/platform/enforce.h index 3c03a9027..d1dd09f20 100644 --- a/paddle/fluid/platform/enforce.h +++ b/paddle/fluid/platform/enforce.h @@ -260,12 +260,12 @@ 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__); \ + } \ } while (0) #ifndef REPLACE_ENFORCE_GLOG -- GitLab