diff options
| author | yangwei <[email protected]> | 2024-08-07 14:04:07 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2024-08-12 15:48:37 +0800 |
| commit | 90ca08568edfd70ff77cf4c045fda27b36a14d1c (patch) | |
| tree | 8663c42f95824104da62394c53cb6c6f459cdfc1 /deps | |
| parent | 6bb5c44ee39d920cd6e3da7fab52a1a1cce548ba (diff) | |
🐎 ci(stage upgrade): split to 4 stage
Diffstat (limited to 'deps')
| -rw-r--r-- | deps/rbtree/rbtree.h | 2 | ||||
| -rw-r--r-- | deps/toml/toml.cpp | 40 |
2 files changed, 21 insertions, 21 deletions
diff --git a/deps/rbtree/rbtree.h b/deps/rbtree/rbtree.h index 25bd4da..f474b68 100644 --- a/deps/rbtree/rbtree.h +++ b/deps/rbtree/rbtree.h @@ -342,7 +342,7 @@ rb_find_first(const void *key, const struct rb_root *tree, match = node; node = node->rb_left; } - else if (c > 0) + else { node = node->rb_right; } diff --git a/deps/toml/toml.cpp b/deps/toml/toml.cpp index d8df2cd..fef21a1 100644 --- a/deps/toml/toml.cpp +++ b/deps/toml/toml.cpp @@ -2502,32 +2502,32 @@ int toml_rtos(toml_raw_t src, char **ret) toml_datum_t toml_string_at(const toml_array_t *arr, int idx) { - toml_datum_t ret; - memset(&ret, 0, sizeof(ret)); + toml_datum_t ret={}; + //memset(&ret, 0, sizeof(ret)); ret.ok = (0 == toml_rtos(toml_raw_at(arr, idx), &ret.u.s)); return ret; } toml_datum_t toml_bool_at(const toml_array_t *arr, int idx) { - toml_datum_t ret; - memset(&ret, 0, sizeof(ret)); + toml_datum_t ret={}; + //memset(&ret, 0, sizeof(ret)); ret.ok = (0 == toml_rtob(toml_raw_at(arr, idx), &ret.u.b)); return ret; } toml_datum_t toml_int_at(const toml_array_t *arr, int idx) { - toml_datum_t ret; - memset(&ret, 0, sizeof(ret)); + toml_datum_t ret={}; + //memset(&ret, 0, sizeof(ret)); ret.ok = (0 == toml_rtoi(toml_raw_at(arr, idx), &ret.u.i)); return ret; } toml_datum_t toml_double_at(const toml_array_t *arr, int idx) { - toml_datum_t ret; - memset(&ret, 0, sizeof(ret)); + toml_datum_t ret={}; + //memset(&ret, 0, sizeof(ret)); ret.ok = (0 == toml_rtod(toml_raw_at(arr, idx), &ret.u.d)); return ret; } @@ -2535,8 +2535,8 @@ toml_datum_t toml_double_at(const toml_array_t *arr, int idx) toml_datum_t toml_timestamp_at(const toml_array_t *arr, int idx) { toml_timestamp_t ts; - toml_datum_t ret; - memset(&ret, 0, sizeof(ret)); + toml_datum_t ret={}; + //memset(&ret, 0, sizeof(ret)); ret.ok = (0 == toml_rtots(toml_raw_at(arr, idx), &ts)); if (ret.ok) { @@ -2567,8 +2567,8 @@ toml_datum_t toml_timestamp_at(const toml_array_t *arr, int idx) toml_datum_t toml_string_in(const toml_table_t *arr, const char *key) { - toml_datum_t ret; - memset(&ret, 0, sizeof(ret)); + toml_datum_t ret={}; + //memset(&ret, 0, sizeof(ret)); toml_raw_t raw = toml_raw_in(arr, key); if (raw) { @@ -2579,24 +2579,24 @@ toml_datum_t toml_string_in(const toml_table_t *arr, const char *key) toml_datum_t toml_bool_in(const toml_table_t *arr, const char *key) { - toml_datum_t ret; - memset(&ret, 0, sizeof(ret)); + toml_datum_t ret={}; + //memset(&ret, 0, sizeof(ret)); ret.ok = (0 == toml_rtob(toml_raw_in(arr, key), &ret.u.b)); return ret; } toml_datum_t toml_int_in(const toml_table_t *arr, const char *key) { - toml_datum_t ret; - memset(&ret, 0, sizeof(ret)); + toml_datum_t ret={}; + //memset(&ret, 0, sizeof(ret)); ret.ok = (0 == toml_rtoi(toml_raw_in(arr, key), &ret.u.i)); return ret; } toml_datum_t toml_double_in(const toml_table_t *arr, const char *key) { - toml_datum_t ret; - memset(&ret, 0, sizeof(ret)); + toml_datum_t ret={}; + //memset(&ret, 0, sizeof(ret)); ret.ok = (0 == toml_rtod(toml_raw_in(arr, key), &ret.u.d)); return ret; } @@ -2604,8 +2604,8 @@ toml_datum_t toml_double_in(const toml_table_t *arr, const char *key) toml_datum_t toml_timestamp_in(const toml_table_t *arr, const char *key) { toml_timestamp_t ts; - toml_datum_t ret; - memset(&ret, 0, sizeof(ret)); + toml_datum_t ret={}; + //memset(&ret, 0, sizeof(ret)); ret.ok = (0 == toml_rtots(toml_raw_in(arr, key), &ts)); if (ret.ok) { |
