diff --git a/.ruleset b/.ruleset index b96c1eedc..2a368c9cc 100644 --- a/.ruleset +++ b/.ruleset @@ -351,7 +351,6 @@ - diff --git a/examples/PhysicallyBasedRendering/main.cpp b/examples/PhysicallyBasedRendering/main.cpp index 2667f6025..a9b4d3fa2 100644 --- a/examples/PhysicallyBasedRendering/main.cpp +++ b/examples/PhysicallyBasedRendering/main.cpp @@ -77,7 +77,7 @@ int main() Nz::ElementRendererRegistry elementRegistry; Nz::ForwardFramePipeline framePipeline(elementRegistry); - std::size_t cameraIndex = framePipeline.RegisterViewer(&camera, 0); + [[maybe_unused]] std::size_t cameraIndex = framePipeline.RegisterViewer(&camera, 0); std::size_t worldInstanceIndex1 = framePipeline.RegisterWorldInstance(modelInstance); framePipeline.RegisterRenderable(worldInstanceIndex1, Nz::FramePipeline::NoSkeletonInstance, &model, 0xFFFFFFFF, scissorBox); diff --git a/examples/Physics2DDemo/main.cpp b/examples/Physics2DDemo/main.cpp index 8ed0227ac..b79ef9b77 100644 --- a/examples/Physics2DDemo/main.cpp +++ b/examples/Physics2DDemo/main.cpp @@ -113,8 +113,6 @@ int main() //Nz::Mouse::SetRelativeMouseMode(true); - float elapsedTime = 0.f; - Nz::PidController headingController(0.5f, 0.f, 0.05f); Nz::PidController upController(1.f, 0.f, 0.1f); diff --git a/examples/PhysicsPlayground/main.cpp b/examples/PhysicsPlayground/main.cpp index 33b961609..b19d4169c 100644 --- a/examples/PhysicsPlayground/main.cpp +++ b/examples/PhysicsPlayground/main.cpp @@ -68,7 +68,7 @@ int main() return true; }); - entt::handle boxEntity = world.CreateEntity(); + entt::handle boxColliderEntity = world.CreateEntity(); { std::shared_ptr boxMesh = Nz::GraphicalMesh::Build(Nz::Primitive::Box(Nz::Vector3f(BoxDims), Nz::Vector3ui::Zero(), Nz::Matrix4f::Scale(Nz::Vector3f(-1.f)), Nz::Rectf(0.f, 0.f, 2.f, 2.f))); @@ -88,10 +88,10 @@ int main() std::shared_ptr boxModel = std::make_shared(std::move(boxMesh)); boxModel->SetMaterial(0, std::move(boxMat)); - auto& boxGfx = boxEntity.emplace(); + auto& boxGfx = boxColliderEntity.emplace(); boxGfx.AttachRenderable(std::move(boxModel)); - boxEntity.emplace(); + boxColliderEntity.emplace(); #if USE_JOLT float thickness = 1.f; @@ -128,9 +128,9 @@ int main() Nz::JoltRigidBody3D::StaticSettings settings; settings.geom = boxCollider; - auto& boxBody = boxEntity.emplace(physSystem.CreateRigidBody(settings)); + boxColliderEntity.emplace(physSystem.CreateRigidBody(settings)); #else - auto& boxBody = boxEntity.emplace(physSystem.CreateRigidBody(boxCollider)); + auto& boxBody = boxColliderEntity.emplace(physSystem.CreateRigidBody(boxCollider)); boxBody.SetMass(0.f); #endif @@ -186,9 +186,9 @@ int main() settings.geom = sphereCollider; settings.mass = 4.f / 3.f * Nz::Pi * Nz::IntegralPow(radius, 3); - auto& ballPhysics = ballEntity.emplace(physSystem.CreateRigidBody(settings)); + ballEntity.emplace(physSystem.CreateRigidBody(settings)); #else - auto& ballPhysics = ballEntity.emplace(physSystem.CreateRigidBody(sphereCollider)); + ballEntity.emplace(physSystem.CreateRigidBody(sphereCollider)); #endif } @@ -434,7 +434,7 @@ int main() #endif auto callback = [&](const decltype(lastHitInfo)& hitInfo) -> std::optional { - if (hitInfo.hitEntity == boxEntity) + if (hitInfo.hitEntity == boxColliderEntity) { Nz::Vector3f dirToCenter = Nz::Vector3f::Zero() - hitInfo.hitPosition; dirToCenter.Normalize(); @@ -450,7 +450,7 @@ int main() if (physSystem.RaycastQuery(from, to, callback)) { - if (lastHitInfo.hitBody && lastHitInfo.hitEntity != boxEntity) + if (lastHitInfo.hitBody && lastHitInfo.hitEntity != boxColliderEntity) { #if USE_JOLT grabConstraint.emplace(*lastHitInfo.hitBody, lastHitInfo.hitPosition); diff --git a/examples/Tut00/main.cpp b/examples/Tut00/main.cpp index 9c0d835a5..7cc54453a 100644 --- a/examples/Tut00/main.cpp +++ b/examples/Tut00/main.cpp @@ -12,7 +12,7 @@ int main(int argc, char* argv[]) { // This "example" has only one purpose: Giving an empty project for you to test whatever you want // If you wish to have multiple test projects, you only have to copy/paste this directory and change the name in the xmake.lua - Nz::Application app; + Nz::Application app(argc, argv); return EXIT_SUCCESS; } diff --git a/include/Nazara/Utility/IndexMapper.hpp b/include/Nazara/Utility/IndexMapper.hpp index f359bbfa2..7e99daac5 100644 --- a/include/Nazara/Utility/IndexMapper.hpp +++ b/include/Nazara/Utility/IndexMapper.hpp @@ -20,7 +20,7 @@ namespace Nz { public: IndexMapper(IndexBuffer& indexBuffer, UInt32 indexCount = 0); - IndexMapper(SubMesh& subMes); + IndexMapper(SubMesh& subMesh); ~IndexMapper() = default; UInt32 Get(std::size_t i) const; diff --git a/src/Nazara/Graphics/ForwardFramePipeline.cpp b/src/Nazara/Graphics/ForwardFramePipeline.cpp index ebfaf4ebc..93cf46a56 100644 --- a/src/Nazara/Graphics/ForwardFramePipeline.cpp +++ b/src/Nazara/Graphics/ForwardFramePipeline.cpp @@ -643,7 +643,7 @@ namespace Nz mergePass.AddOutput(renderTargetData.finalAttachment); mergePass.SetClearColor(0, Color::Black()); - mergePass.SetCommandCallback([&targetViewers](CommandBufferBuilder& builder, const FramePassEnvironment& env) + mergePass.SetCommandCallback([&targetViewers](CommandBufferBuilder& builder, const FramePassEnvironment& /*env*/) { Graphics* graphics = Graphics::Instance(); builder.BindRenderPipeline(*graphics->GetBlitPipeline(false)); diff --git a/src/Nazara/Widgets/SimpleWidgetStyles.cpp b/src/Nazara/Widgets/SimpleWidgetStyles.cpp index a9dc0b166..757d175ce 100644 --- a/src/Nazara/Widgets/SimpleWidgetStyles.cpp +++ b/src/Nazara/Widgets/SimpleWidgetStyles.cpp @@ -391,15 +391,15 @@ namespace Nz SimpleScrollAreaWidgetStyle::SimpleScrollAreaWidgetStyle(ScrollAreaWidget* scrollAreaWidget) : - ScrollAreaWidgetStyle((BaseWidget*) scrollAreaWidget, 0) + ScrollAreaWidgetStyle(scrollAreaWidget, 0) { } - void SimpleScrollAreaWidgetStyle::Layout(const Vector2f& size) + void SimpleScrollAreaWidgetStyle::Layout(const Vector2f& /*size*/) { } - void SimpleScrollAreaWidgetStyle::UpdateRenderLayer(int baseRenderLayer) + void SimpleScrollAreaWidgetStyle::UpdateRenderLayer(int /*baseRenderLayer*/) { } diff --git a/tests/UnitTests/Engine/Core/ParameterListTest.cpp b/tests/UnitTests/Engine/Core/ParameterListTest.cpp index 77dc2f4ef..8821ca3c8 100644 --- a/tests/UnitTests/Engine/Core/ParameterListTest.cpp +++ b/tests/UnitTests/Engine/Core/ParameterListTest.cpp @@ -194,7 +194,7 @@ SCENARIO("ParameterList", "[CORE][PARAMETERLIST]") THEN("We can get it back") { - void* ptrToData; + void* ptrToData = nullptr; //< to stfu compiler CHECK_NOTHROW(ptrToData = parameterList.GetUserdataParameter("userData").GetValue()); Data* dataPtr = static_cast(ptrToData);