From 60f34fd6bf85e9c9b146cd39d0b6949b21203f99 Mon Sep 17 00:00:00 2001 From: Hirek193 Date: Sat, 31 Oct 2026 20:09:22 +0100 Subject: [PATCH] Fix the calls of track_rails path functions hidden by the TTrack members of the same names --- world/RailCrossings.cpp | 6 +++--- world/RailLayer.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/world/RailCrossings.cpp b/world/RailCrossings.cpp index e9cca18b..e25ba09f 100644 --- a/world/RailCrossings.cpp +++ b/world/RailCrossings.cpp @@ -751,13 +751,13 @@ track_rails::check_rail_set TTrack::check_rails( std::vector cons continue; } crossers.push_back( entry.track ); - for( int otherpath = 0; otherpath < path_count( *entry.track ); ++otherpath ) { + for( int otherpath = 0; otherpath < track_rails::path_count( *entry.track ); ++otherpath ) { for( auto const side : { -1.0, 1.0 } ) { - crossing.push_back( make_gauge_line( path_segment( *entry.track, otherpath ), side * 0.5 * std::abs( entry.track->fTrackWidth ), 0.0 ) ); + crossing.push_back( make_gauge_line( track_rails::path_segment( *entry.track, otherpath ), side * 0.5 * std::abs( entry.track->fTrackWidth ), 0.0 ) ); } } } - for( int path = 0; path < path_count( *this ); ++path ) { + for( int path = 0; path < track_rails::path_count( *this ); ++path ) { for( int right = 0; right < 2; ++right ) { auto &checks { plans[ path ][ right ] }; if( checks.empty() ) { diff --git a/world/RailLayer.cpp b/world/RailLayer.cpp index 3f7a855b..358a4628 100644 --- a/world/RailLayer.cpp +++ b/world/RailLayer.cpp @@ -629,7 +629,7 @@ TTrack::rail_layer::rail_layer( TTrack &Track, rail_layout const &Layout, rail_d m_openend { Openend }, m_geometry { Geometry }, m_cuts { Cuts }, - m_segment { path_segment( Track, Path ) }, + m_segment { track_rails::path_segment( Track, Path ) }, m_length { m_segment.GetLength() }, m_guardoffset { -( flangeway + Drawing.size.head ) }, m_rise { track_sleepers::wing_rise( Track ) },