@@ -70,12 +70,12 @@ enum class Error : error_code_t {
7070 * @param[in] message__ Format string for the log error message.
7171 * @param[in] ... Optional additional arguments for the format string.
7272 */
73- #define TK_CHECK_OR_RETURN_ERROR (cond__, error__, message__, ...) \
74- { \
75- if (!(cond__)) { \
76- TK_LOG (Error, message__, ##__VA_ARGS__); \
77- return ::tokenizers::Error::error__; \
78- } \
73+ #define TK_CHECK_OR_RETURN_ERROR (cond__, error__, message__, ...) \
74+ { \
75+ if (!(cond__)) { \
76+ TK_LOG (Error, message__, ##__VA_ARGS__); \
77+ return ::tokenizers::Error::error__; \
78+ } \
7979 }
8080
8181/* *
@@ -86,13 +86,13 @@ enum class Error : error_code_t {
8686 * @param[in] ... Optional format string for the log error message and its
8787 * arguments.
8888 */
89- #define TK_CHECK_OK_OR_RETURN_ERROR (error__, ...) \
89+ #define TK_CHECK_OK_OR_RETURN_ERROR (error__, ...) \
9090 TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR (error__, ##__VA_ARGS__)
9191
9292// Internal only: Use ET_CHECK_OK_OR_RETURN_ERROR() instead.
93- #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR (...) \
94- TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_SELECT (__VA_ARGS__, 10 , 9 , 8 , 7 , 6 , 5 , \
95- 4 , 3 , 2 , 1 ) \
93+ #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR (...) \
94+ TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_SELECT ( \
95+ __VA_ARGS__, 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 ) \
9696 (__VA_ARGS__)
9797
9898/* *
@@ -119,43 +119,43 @@ enum class Error : error_code_t {
119119 * TK_CHECK_OK_OR_RETURN_ERROR(error_code); // Calls v1
120120 * TK_CHECK_OK_OR_RETURN_ERROR(error_code, "Error message", ...); // Calls v2
121121 */
122- #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_SELECT (_1, _2, _3, _4, _5, _6, \
123- _7, _8, _9, _10, N, ...) \
122+ #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_SELECT ( \
123+ _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) \
124124 TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_##N
125125
126126// Internal only: Use ET_CHECK_OK_OR_RETURN_ERROR() instead.
127- #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_1 (error__ ) \
128- do { \
129- const auto et_error__ = (error__); \
130- if (et_error__ != ::tokenizers::Error::Ok) { \
131- return et_error__; \
132- } \
127+ #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_1 (error__ ) \
128+ do { \
129+ const auto et_error__ = (error__); \
130+ if (et_error__ != ::tokenizers::Error::Ok) { \
131+ return et_error__; \
132+ } \
133133 } while (0 )
134134
135135// Internal only: Use ET_CHECK_OK_OR_RETURN_ERROR() instead.
136- #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_2 (error__, message__, ...) \
137- do { \
138- const auto et_error__ = (error__); \
139- if (et_error__ != ::tokenizers::Error::Ok) { \
140- TK_LOG (Error, message__, ##__VA_ARGS__); \
141- return et_error__; \
142- } \
136+ #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_2 (error__, message__, ...) \
137+ do { \
138+ const auto et_error__ = (error__); \
139+ if (et_error__ != ::tokenizers::Error::Ok) { \
140+ TK_LOG (Error, message__, ##__VA_ARGS__); \
141+ return et_error__; \
142+ } \
143143 } while (0 )
144144
145145// Internal only: Use ET_CHECK_OK_OR_RETURN_ERROR() instead.
146- #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_3 \
146+ #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_3 \
147147 TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_2
148- #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_4 \
148+ #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_4 \
149149 TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_2
150- #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_5 \
150+ #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_5 \
151151 TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_2
152- #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_6 \
152+ #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_6 \
153153 TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_2
154- #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_7 \
154+ #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_7 \
155155 TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_2
156- #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_8 \
156+ #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_8 \
157157 TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_2
158- #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_9 \
158+ #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_9 \
159159 TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_2
160- #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_10 \
160+ #define TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_10 \
161161 TK_INTERNAL_CHECK_OK_OR_RETURN_ERROR_2
0 commit comments