Skip to content

Commit 4dda54a

Browse files
authored
Fix unlikely (#11537)
1 parent d734595 commit 4dda54a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

paddle/fluid/inference/analysis/argument.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* big.
2222
*/
2323

24+
#pragma once
25+
2426
#include "paddle/fluid/framework/program_desc.h"
2527
#include "paddle/fluid/inference/analysis/data_flow_graph.h"
2628

@@ -43,7 +45,7 @@ struct Argument {
4345

4446
#define UNLIKELY(condition) __builtin_expect(static_cast<bool>(condition), 0)
4547
#define ANALYSIS_ARGUMENT_CHECK_FIELD(field__) \
46-
if (!UNLIKELY(field__)) { \
48+
if (UNLIKELY(!(field__))) { \
4749
LOG(ERROR) << "field " << #field__ << " should be set."; \
4850
return false; \
4951
}

0 commit comments

Comments
 (0)