Skip to content
Snippets Groups Projects
Commit 287cc28e authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

deal with a few warnings

parent d4e9386a
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
......@@ -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)) {
......
......@@ -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);
}
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment