diff options
| author | skal <pascal.massimino@gmail.com> | 2026-01-31 21:11:11 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-01-31 21:11:11 +0100 |
| commit | 25e693cc46324b4ec588530de542bba8af6f47c6 (patch) | |
| tree | 8a959e442f9330dd3f881fe4109e83b831f25a7e /src/gpu/gpu.h | |
| parent | 9379697ccdf6f44ade7933d5635f72f644f6b92e (diff) | |
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.
Diffstat (limited to 'src/gpu/gpu.h')
| -rw-r--r-- | src/gpu/gpu.h | 17 |
1 files changed, 4 insertions, 13 deletions
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 <webgpu/wgpu.h> -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 <webgpu.h> @@ -49,9 +43,7 @@ using WGPUShaderSourceWGSL = WGPUShaderModuleWGSLDescriptor; #include <wgpu.h> 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)}; |
