From 25e693cc46324b4ec588530de542bba8af6f47c6 Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 31 Jan 2026 21:11:11 +0100 Subject: style: add vertical compression rules to clang-format - Enabled AllowShortFunctionsOnASingleLine: All - Enabled AllowShortBlocksOnASingleLine: Always - Enabled AllowShortIfStatementsOnASingleLine: Always - Enabled AllowShortLoopsOnASingleLine: true - Set MaxEmptyLinesToKeep: 1 - Applied formatting to all source files. --- src/gpu/gpu.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/gpu/gpu.h') diff --git a/src/gpu/gpu.h b/src/gpu/gpu.h index c2c0670..eb3dd8a 100644 --- a/src/gpu/gpu.h +++ b/src/gpu/gpu.h @@ -16,13 +16,9 @@ #include -static inline const char *str_view(const char *str) { - return str; -} +static inline const char *str_view(const char *str) { return str; } -static inline const char *label_view(const char *str) { - return str; -} +static inline const char *label_view(const char *str) { return str; } #define WGPUSType_ShaderSourceWGSL WGPUSType_ShaderModuleWGSLDescriptor @@ -40,8 +36,6 @@ using WGPUShaderSourceWGSL = WGPUShaderModuleWGSLDescriptor; #else - - // Native (macOS/Linux) using newer wgpu-native #include @@ -49,9 +43,7 @@ using WGPUShaderSourceWGSL = WGPUShaderModuleWGSLDescriptor; #include static inline WGPUStringView str_view(const char *str) { - - if (!str) - return {nullptr, 0}; + if (!str) return {nullptr, 0}; return {str, strlen(str)}; } @@ -60,8 +52,7 @@ static inline WGPUStringView label_view(const char *str) { #ifndef STRIP_ALL - if (!str) - return {nullptr, 0}; + if (!str) return {nullptr, 0}; return {str, strlen(str)}; -- cgit v1.2.3