diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-01-08 16:34:43 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-01-08 16:34:43 +0000 |
commit | 8cd0977a3688fa705c83867c57505a47b9269369 (patch) | |
tree | b7b48711051299607077ed31fdf3b3f6dd6cc41f /game/network/rail.cpp | |
parent | Tidy shadow map creation (diff) | |
download | ilt-8cd0977a3688fa705c83867c57505a47b9269369.tar.bz2 ilt-8cd0977a3688fa705c83867c57505a47b9269369.tar.xz ilt-8cd0977a3688fa705c83867c57505a47b9269369.zip |
Fix up all the static analyzer warnings
Diffstat (limited to 'game/network/rail.cpp')
-rw-r--r-- | game/network/rail.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/game/network/rail.cpp b/game/network/rail.cpp index 2f09d88..e7006cf 100644 --- a/game/network/rail.cpp +++ b/game/network/rail.cpp @@ -40,7 +40,7 @@ RailLinks::addLinksBetween(glm::vec3 start, glm::vec3 end) std::swap(start, end); } // Find start link/end - opposite entry dir to existing link; so pi +... - float dir = pi + findNodeDirection(node1ins.first); + const float dir = pi + findNodeDirection(node1ins.first); if (dir == vector_yaw(end - start)) { return addLink<RailLinkStraight>(start, end); } @@ -50,7 +50,7 @@ RailLinks::addLinksBetween(glm::vec3 start, glm::vec3 end) const auto sm = glm::distance(flatStart, mid), em = glm::distance(flatEnd, mid); return start.z + ((end.z - start.z) * (sm / (sm + em))); }; - float dir2 = pi + findNodeDirection(node2ins.first); + const float dir2 = pi + findNodeDirection(node2ins.first); if (const auto radii = find_arcs_radius(flatStart, dir, flatEnd, dir2); radii.first < radii.second) { const auto radius {radii.first}; const auto c1 = flatStart + sincosf(dir + half_pi) * radius; |