From 7784d60a74015f41fcd1b9cd3ba38f34562ac1b7 Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Thu, 13 Nov 2025 19:28:16 -0800 Subject: [PATCH] Fix formatting --- .clang-format | 8 ++++---- src/list.c | 2 +- src/map.c | 2 +- src/vector.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.clang-format b/.clang-format index 6179d86..336e9fe 100644 --- a/.clang-format +++ b/.clang-format @@ -28,13 +28,13 @@ SpaceAfterCStyleCast: true PenaltyReturnTypeOnItsOwnLine: 240 AttributeMacros: ForEachMacros: - - GGL_LIST_FOREACH - - GGL_MAP_FOREACH - - GGL_BUF_LIST_FOREACH + - GG_LIST_FOREACH + - GG_MAP_FOREACH + - GG_BUF_LIST_FOREACH Macros: - CBMC_CONTRACT(x)=[[cbmc::contract(x)]] - NODISCARD=[[nodiscard]] - - GGL_EXPORT=[[gnu::visibility(protected)]] + - GG_EXPORT=[[gnu::visibility(protected)]] - VISIBILITY(x)=[[gnu::visibility(x)]] - FORMAT(x,y,z)=[[gnu::format(x,y,z)]] - UNUSED=[[gnu::unused]] diff --git a/src/list.c b/src/list.c index cd1016e..3aa9997 100644 --- a/src/list.c +++ b/src/list.c @@ -8,7 +8,7 @@ #include GgError gg_list_type_check(GgList list, GgObjectType type) { - GG_LIST_FOREACH(elem, list) { + GG_LIST_FOREACH (elem, list) { if (gg_obj_type(*elem) != type) { GG_LOGE("List element is of invalid type."); return GG_ERR_PARSE; diff --git a/src/map.c b/src/map.c index 48f78c1..1748df8 100644 --- a/src/map.c +++ b/src/map.c @@ -67,7 +67,7 @@ GgObject *gg_kv_val(GgKV *kv) { } bool gg_map_get(GgMap map, GgBuffer key, GgObject **result) { - GG_MAP_FOREACH(pair, map) { + GG_MAP_FOREACH (pair, map) { if (gg_buffer_eq(key, gg_kv_key(*pair))) { if (result != NULL) { *result = gg_kv_val(pair); diff --git a/src/vector.c b/src/vector.c index 3e221cc..a34e674 100644 --- a/src/vector.c +++ b/src/vector.c @@ -143,7 +143,7 @@ void gg_buf_vec_chain_push(GgError *err, GgBufVec *vector, GgBuffer buf) { } GgError gg_buf_vec_append_list(GgBufVec *vector, GgList list) { - GG_LIST_FOREACH(item, list) { + GG_LIST_FOREACH (item, list) { if (gg_obj_type(*item) != GG_TYPE_BUF) { return GG_ERR_INVALID; }