From f2654cf7d46b0e55d288cc48bdd6af872fb021f4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 2 May 2021 14:44:31 +0100 Subject: Fix warnings produced by new clang-tidy --- game/network/rail.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'game/network') diff --git a/game/network/rail.cpp b/game/network/rail.cpp index 0cb2725..1f432cb 100644 --- a/game/network/rail.cpp +++ b/game/network/rail.cpp @@ -155,7 +155,7 @@ RailLinkCurve::RailLinkCurve(const NodePtr & a, const NodePtr & b, glm::vec3 c, const auto step {glm::vec3 {-arc_length(arc), e0p.y - e1p.y, slength} / segs}; const auto trans {glm::translate(centreBase)}; - int segCount = segs; + auto segCount = std::lround(segs); std::vector vertices; vertices.reserve((segCount + 1) * railCrossSection.size()); for (glm::vec3 swing = {arc.second, e1p.y - centreBase.y, 0.F}; segCount >= 0; swing += step, --segCount) { -- cgit v1.2.3