From 8ce27b7e15f0fc65c8ee78950c7501660b936178 Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 14 Feb 2026 15:14:25 +0100 Subject: style: Apply clang-format to codebase --- src/gpu/sampler_cache.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/gpu/sampler_cache.h') diff --git a/src/gpu/sampler_cache.h b/src/gpu/sampler_cache.h index 5df3958..7149921 100644 --- a/src/gpu/sampler_cache.h +++ b/src/gpu/sampler_cache.h @@ -16,10 +16,14 @@ struct SamplerSpec { uint16_t anisotropy; bool operator<(const SamplerSpec& o) const { - if (u != o.u) return u < o.u; - if (v != o.v) return v < o.v; - if (mag != o.mag) return mag < o.mag; - if (min != o.min) return min < o.min; + if (u != o.u) + return u < o.u; + if (v != o.v) + return v < o.v; + if (mag != o.mag) + return mag < o.mag; + if (min != o.min) + return min < o.min; return anisotropy < o.anisotropy; } }; @@ -28,7 +32,7 @@ class SamplerCache { std::map cache_; SamplerCache() = default; -public: + public: static SamplerCache& Get() { static SamplerCache instance; return instance; @@ -36,7 +40,8 @@ public: WGPUSampler get_or_create(WGPUDevice device, const SamplerSpec& spec) { auto it = cache_.find(spec); - if (it != cache_.end()) return it->second; + if (it != cache_.end()) + return it->second; WGPUSamplerDescriptor desc{}; desc.addressModeU = spec.u; -- cgit v1.2.3