Skip to content

Commit 843fb2e

Browse files
committed
Make code more readable
1 parent c88dec2 commit 843fb2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

paddle/utils/Error.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ limitations under the License. */
1515
#pragma once
1616

1717
#include <glog/logging.h>
18+
#include <stdarg.h>
1819
#include <stdio.h>
1920
#include <memory>
2021
#include <string>
@@ -113,7 +114,7 @@ class Error {
113114
/**
114115
* @brief operator bool, return True if there is no error.
115116
*/
116-
operator bool() const { return !msg_; }
117+
operator bool() const { return msg_ == nullptr; }
117118

118119
/**
119120
* @brief check this status by glog.

0 commit comments

Comments
 (0)