From 6808deeca2821b27f5a1d0b74a9392d41ef27fa9 Mon Sep 17 00:00:00 2001 From: sfja Date: Wed, 19 Mar 2025 21:46:23 +0100 Subject: [PATCH] refactor extract vec --- backend/src/collections/kv_map.h | 2 +- backend/src/collections/{collection.h => vec.h} | 3 +-- backend/src/db/db.h | 2 +- backend/src/http/packet.h | 2 +- backend/src/http/server.h | 2 +- backend/src/json/json.c | 2 +- backend/src/models/models.h | 2 +- backend/src/util/str.h | 2 +- 8 files changed, 8 insertions(+), 9 deletions(-) rename backend/src/collections/{collection.h => vec.h} (99%) diff --git a/backend/src/collections/kv_map.h b/backend/src/collections/kv_map.h index be2bf5a..50464f9 100644 --- a/backend/src/collections/kv_map.h +++ b/backend/src/collections/kv_map.h @@ -1,6 +1,6 @@ #pragma once -#include "collection.h" +#include "vec.h" #define DEFINE_KV_MAP(KEY, VALUE, MAP_TYPE, FN_PREFIX) \ typedef KEY MAP_TYPE##Key; \ diff --git a/backend/src/collections/collection.h b/backend/src/collections/vec.h similarity index 99% rename from backend/src/collections/collection.h rename to backend/src/collections/vec.h index 5d8697f..961822d 100644 --- a/backend/src/collections/collection.h +++ b/backend/src/collections/vec.h @@ -1,10 +1,9 @@ #pragma once +#include "../util/attrs.h" #include #include -#define MAYBE_UNUSED __attribute__((unused)) - #define DECLARE_VEC_TYPE(TYPE, VEC_TYPE, FN_PREFIX, FN_SPECIFIER) \ typedef TYPE VEC_TYPE##T; \ typedef struct { \ diff --git a/backend/src/db/db.h b/backend/src/db/db.h index 2a4f9d4..b743ed8 100644 --- a/backend/src/db/db.h +++ b/backend/src/db/db.h @@ -1,6 +1,6 @@ #pragma once -#include "../collections/collection.h" +#include "../collections/vec.h" #include "../models/models.h" #include #include diff --git a/backend/src/http/packet.h b/backend/src/http/packet.h index 2223190..c1565fa 100644 --- a/backend/src/http/packet.h +++ b/backend/src/http/packet.h @@ -1,6 +1,6 @@ #pragma once -#include "../collections/collection.h" +#include "../collections/vec.h" #include #define MAX_HEADER_BUFFER_SIZE 65536 diff --git a/backend/src/http/server.h b/backend/src/http/server.h index c41da00..7cd23c1 100644 --- a/backend/src/http/server.h +++ b/backend/src/http/server.h @@ -1,6 +1,6 @@ #pragma once -#include "../collections/collection.h" +#include "../collections/vec.h" #include "client_connection.h" #include "http.h" #include "packet.h" diff --git a/backend/src/json/json.c b/backend/src/json/json.c index 484644f..6da60d0 100644 --- a/backend/src/json/json.c +++ b/backend/src/json/json.c @@ -1,5 +1,5 @@ #include "json.h" -#include "../collections/collection.h" +#include "../collections/vec.h" #include "../util/str.h" #include #include diff --git a/backend/src/models/models.h b/backend/src/models/models.h index dbcd51d..7288b6b 100644 --- a/backend/src/models/models.h +++ b/backend/src/models/models.h @@ -1,6 +1,6 @@ #pragma once -#include "../collections/collection.h" +#include "../collections/vec.h" #include typedef struct { diff --git a/backend/src/util/str.h b/backend/src/util/str.h index 91793e0..8007b79 100644 --- a/backend/src/util/str.h +++ b/backend/src/util/str.h @@ -1,6 +1,6 @@ #pragma once -#include "../collections/collection.h" +#include "../collections/vec.h" #include #include #include