diff --git a/demo/demo/robot/programmer.cpp b/demo/demo/robot/programmer.cpp index 5d3a1e5f727179fc9de1c23ab9f2fb6ad2f22eee..a4592d56263e39472b45ad5ce6156583f80d3c99 100644 --- a/demo/demo/robot/programmer.cpp +++ b/demo/demo/robot/programmer.cpp @@ -46,7 +46,6 @@ namespace demo::robot { } void Timeline::renderInstructions(fggl::gfx::Paint& paint) { - const auto size = this->size(); const fggl::math::vec2f barExtents{16, 16}; for ( auto track=0U; track < m_tracks.size(); ++track) { diff --git a/fggl/scenes/menu.cpp b/fggl/scenes/menu.cpp index 36639147a33f34ae2233fcbf982087d3a9fc278b..a49729872836ac4480a47625cb8920e07b9a3e12 100644 --- a/fggl/scenes/menu.cpp +++ b/fggl/scenes/menu.cpp @@ -26,15 +26,15 @@ namespace fggl::scenes { m_inputs = app.service<input::Input>(); } - void BasicMenu::update(float dt) { + void BasicMenu::update(float /*dt*/) { if (m_inputs != nullptr) { m_cursorPos.x = m_inputs->mouse.axis(MouseAxis::X); m_cursorPos.y = m_inputs->mouse.axis(MouseAxis::Y); // in canvas space math::vec2 projected; - projected.x = math::rescale_ndc(m_cursorPos.x, 0, 1920.f); - projected.y = math::rescale_ndc(m_cursorPos.y, 0, 1080.0f); + projected.x = math::rescale_ndc(m_cursorPos.x, 0, 1920.0F); + projected.y = math::rescale_ndc(m_cursorPos.y, 0, 1080.0F); m_canvas.onMouseOver(projected); if (m_inputs->mouse.pressed(MouseButton::LEFT)) { diff --git a/include/fggl/gfx/paint.hpp b/include/fggl/gfx/paint.hpp index fe18e27c40b96976789f8126d339f6e1ff199515..c0a1effef3eaceba5740e153dca325a8bfdb661c 100644 --- a/include/fggl/gfx/paint.hpp +++ b/include/fggl/gfx/paint.hpp @@ -225,14 +225,14 @@ namespace fggl::gfx { }; inline Path2D make_shape(math::vec2 center, float radius, int sides, math::vec3 colour = colours::WHITE, ShapeOpts opts = {}) { - double angle = (M_PI * 2.0) / sides; + float angle = (M_PI * 2.0F) / sides; fggl::gfx::Path2D tileGfx(center); tileGfx.colour(colour); for (int i=0; i < sides; ++i) { - float xPos = (float)(sin(i * angle + opts.angleOffset) * radius) + center.x; - float yPos = (float)(cos(i * angle + opts.angleOffset) * radius) + center.y; + float xPos = (float)(sinf(i * angle + opts.angleOffset) * radius) + center.x; + float yPos = (float)(cosf(i * angle + opts.angleOffset) * radius) + center.y; if (!opts.sinFirst) { std::swap(xPos, yPos); } diff --git a/include/fggl/gui/widgets.hpp b/include/fggl/gui/widgets.hpp index 9a206f9a61e64f3ae8f157ddff84f8cbc7a96ca5..f78926d5e1a8a9c54cfcec16e9976c1da8a86bb2 100644 --- a/include/fggl/gui/widgets.hpp +++ b/include/fggl/gui/widgets.hpp @@ -61,7 +61,7 @@ namespace fggl::gui { } void layout() override; - inline void update(float deltaTime) override {} + inline void update(float /*deltaTime*/) override {} private: std::shared_ptr<gui::FontFace> m_font; @@ -83,7 +83,7 @@ namespace fggl::gui { [[nodiscard]] std::string label() const; - inline void update(float deltaTime) override {} + inline void update(float /*deltaTime*/) override {} void addCallback(Callback callback); void layout() override;