We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73c3a05 commit 6ec238bCopy full SHA for 6ec238b
src/support/json.h
@@ -271,14 +271,15 @@ struct Value {
271
};
272
273
char* parse(char* curr, StringEncoding stringEncoding) {
274
-#define is_json_space(x) \
275
- (x == 32 || x == 9 || x == 10 || \
276
- x == 13) /* space, tab, linefeed/newline, or return */
277
-#define skip() \
278
- { \
279
- while (*curr && is_json_space(*curr)) \
280
- curr++; \
281
- }
+ auto is_json_space = [](char x) -> bool {
+ return x == 32 || x == 9 || x == 10 ||
+ x == 13; /* space, tab, linefeed/newline, or return */
+ };
+ auto skip = [&]() -> void {
+ while (*curr && is_json_space(*curr)) {
+ curr++;
+ }
282
283
skip();
284
if (*curr == '"') {
285
// String
0 commit comments