From 60fccdbd71a87fe70190a137457e8f899b11fbe0 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sun, 10 Apr 2022 02:45:41 +0200 Subject: [PATCH] LibSoftGPU: Remove superfluous braces in `Clipper` --- Userland/Libraries/LibSoftGPU/Clipper.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Userland/Libraries/LibSoftGPU/Clipper.cpp b/Userland/Libraries/LibSoftGPU/Clipper.cpp index b4739d834b..0636dfc3d1 100644 --- a/Userland/Libraries/LibSoftGPU/Clipper.cpp +++ b/Userland/Libraries/LibSoftGPU/Clipper.cpp @@ -16,19 +16,18 @@ namespace SoftGPU { template static constexpr bool point_within_clip_plane(FloatVector4 const& vertex) { - if constexpr (plane == Clipper::ClipPlane::LEFT) { + if constexpr (plane == Clipper::ClipPlane::LEFT) return vertex.x() >= -vertex.w(); - } else if constexpr (plane == Clipper::ClipPlane::RIGHT) { + else if constexpr (plane == Clipper::ClipPlane::RIGHT) return vertex.x() <= vertex.w(); - } else if constexpr (plane == Clipper::ClipPlane::TOP) { + else if constexpr (plane == Clipper::ClipPlane::TOP) return vertex.y() <= vertex.w(); - } else if constexpr (plane == Clipper::ClipPlane::BOTTOM) { + else if constexpr (plane == Clipper::ClipPlane::BOTTOM) return vertex.y() >= -vertex.w(); - } else if constexpr (plane == Clipper::ClipPlane::NEAR) { + else if constexpr (plane == Clipper::ClipPlane::NEAR) return vertex.z() >= -vertex.w(); - } else if constexpr (plane == Clipper::ClipPlane::FAR) { + else if constexpr (plane == Clipper::ClipPlane::FAR) return vertex.z() <= vertex.w(); - } return false; }