summaryrefslogtreecommitdiff
path: root/game/network/rail.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-05-02 14:44:31 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-05-02 14:44:31 +0100
commitf2654cf7d46b0e55d288cc48bdd6af872fb021f4 (patch)
treeb3bc31345a2ea16fd6b76b0435247027fab48808 /game/network/rail.cpp
parentBump to release GCC version (diff)
downloadilt-f2654cf7d46b0e55d288cc48bdd6af872fb021f4.tar.bz2
ilt-f2654cf7d46b0e55d288cc48bdd6af872fb021f4.tar.xz
ilt-f2654cf7d46b0e55d288cc48bdd6af872fb021f4.zip
Fix warnings produced by new clang-tidy
Diffstat (limited to 'game/network/rail.cpp')
-rw-r--r--game/network/rail.cpp2
1 files changed, 1 insertions, 1 deletions
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<Vertex> vertices;
vertices.reserve((segCount + 1) * railCrossSection.size());
for (glm::vec3 swing = {arc.second, e1p.y - centreBase.y, 0.F}; segCount >= 0; swing += step, --segCount) {