From 727054a5f93cb27b2b871fb83b484e00f73d990f Mon Sep 17 00:00:00 2001 From: Adam Kewley Date: Tue, 27 Feb 2024 11:16:33 +0100 Subject: [PATCH] Apply lint changes etc. --- src/oscar/Graphics/GraphicsImplementation.cpp | 2 +- src/oscar/Maths/EulerPerspectiveCamera.h | 12 ++++++------ src/oscar/Maths/MathsImplementation.cpp | 12 ++---------- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/oscar/Graphics/GraphicsImplementation.cpp b/src/oscar/Graphics/GraphicsImplementation.cpp index bcddaf6d3..9ccfe09d6 100644 --- a/src/oscar/Graphics/GraphicsImplementation.cpp +++ b/src/oscar/Graphics/GraphicsImplementation.cpp @@ -4647,7 +4647,7 @@ namespace } auto copy = format(); - copy.insert(std::move(desc)); + copy.insert(desc); setFormat(copy); return true; } diff --git a/src/oscar/Maths/EulerPerspectiveCamera.h b/src/oscar/Maths/EulerPerspectiveCamera.h index a137172a0..d5790c45a 100644 --- a/src/oscar/Maths/EulerPerspectiveCamera.h +++ b/src/oscar/Maths/EulerPerspectiveCamera.h @@ -17,11 +17,11 @@ namespace osc Mat4 getViewMtx() const; Mat4 getProjMtx(float aspectRatio) const; - Vec3 origin; - Radians pitch; - Radians yaw; - Radians verticalFOV; - float znear; - float zfar; + Vec3 origin = {}; + Radians pitch = Degrees{0}; + Radians yaw = Degrees{180}; + Radians verticalFOV = Degrees{35}; + float znear = 0.1f; + float zfar = 1000.0f; }; } diff --git a/src/oscar/Maths/MathsImplementation.cpp b/src/oscar/Maths/MathsImplementation.cpp index e9433d004..a6be9e541 100644 --- a/src/oscar/Maths/MathsImplementation.cpp +++ b/src/oscar/Maths/MathsImplementation.cpp @@ -462,16 +462,6 @@ std::ostream& osc::operator<<(std::ostream& o, Disc const& d) // `EulerPerspectiveCamera` implementation -osc::EulerPerspectiveCamera::EulerPerspectiveCamera() : - origin{}, - pitch{}, - yaw{-180_deg}, - verticalFOV{35_deg}, - znear{0.1f}, - zfar{1000.0f} -{ -} - Vec3 osc::EulerPerspectiveCamera::getFront() const { return normalize(Vec3 @@ -691,6 +681,7 @@ void osc::FocusAlongAxis(PolarPerspectiveCamera& camera, size_t axis, bool negat case 0: FocusAlongMinusX(camera); break; case 1: FocusAlongMinusY(camera); break; case 2: FocusAlongMinusZ(camera); break; + default: break; } } else { @@ -698,6 +689,7 @@ void osc::FocusAlongAxis(PolarPerspectiveCamera& camera, size_t axis, bool negat case 0: FocusAlongX(camera); break; case 1: FocusAlongY(camera); break; case 2: FocusAlongZ(camera); break; + default: break; } } }