From c6925914e330d474fc690461a88918e0119d9a9c Mon Sep 17 00:00:00 2001 From: MechSlayer <0jcrespo1996@gmail.com> Date: Fri, 5 Sep 2025 17:03:59 +0200 Subject: [PATCH] style: run clang-format --- Source/DrangPlatform/Include/drang/strings.h | 4 ++-- Source/DrangPlatform/Source/strings.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/DrangPlatform/Include/drang/strings.h b/Source/DrangPlatform/Include/drang/strings.h index e6047c3..7f6dd55 100644 --- a/Source/DrangPlatform/Include/drang/strings.h +++ b/Source/DrangPlatform/Include/drang/strings.h @@ -36,7 +36,7 @@ DRANG_PLATFORM_API char *drang_strndup(const char *str, size_t n); * @remarks The returned string must be freed using drang_free() when no longer needed. * This macro should only be used within a DRANG error handling context. */ -#define DRANG_TRY_STRDUP(_Str_) (char*)(DRANG_ALLOC_TRY_IMPL(drang_strdup((_Str_)))) +#define DRANG_TRY_STRDUP(_Str_) (char *) (DRANG_ALLOC_TRY_IMPL(drang_strdup((_Str_)))) /** * @brief Duplicates at most n characters of a string with automatic error handling. @@ -49,6 +49,6 @@ DRANG_PLATFORM_API char *drang_strndup(const char *str, size_t n); * @remarks The returned string is always null-terminated and must be freed using drang_free(). * This macro should only be used within a DRANG error handling context. */ -#define DRANG_TRY_STRNDUP(_Str_, _N_) (char*)(DRANG_ALLOC_TRY_IMPL(drang_strndup((_Str_), (_N_)))) +#define DRANG_TRY_STRNDUP(_Str_, _N_) (char *) (DRANG_ALLOC_TRY_IMPL(drang_strndup((_Str_), (_N_)))) DRANG_END_DECLS diff --git a/Source/DrangPlatform/Source/strings.c b/Source/DrangPlatform/Source/strings.c index 0ef33a5..f13a994 100644 --- a/Source/DrangPlatform/Source/strings.c +++ b/Source/DrangPlatform/Source/strings.c @@ -3,7 +3,8 @@ char *drang_strdup(const char *str) { - if (!str) return NULL; + if (!str) + return NULL; const size_t len = strlen(str); char *dup = DRANG_ALLOC_T_N(char, len + 1); if (dup) { @@ -14,7 +15,8 @@ char *drang_strdup(const char *str) } char *drang_strndup(const char *str, size_t n) { - if (!str) return NULL; + if (!str) + return NULL; const size_t len = strnlen(str, n); char *dup = DRANG_ALLOC_T_N(char, len + 1); if (dup) {