X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Froute.cpp;h=be4237d10bddb875f84d172a0a7f98cb1c3b8a55;hb=31f95d95a1cc7cf17df8de57ea122482d5f4a859;hp=5b37fcc06f3f7d381ec63309d9450ffde7f9e558;hpb=1ac853ffc606b29ffd88b923ed3551ee6282afb2;p=r2c2.git diff --git a/source/libr2c2/route.cpp b/source/libr2c2/route.cpp index 5b37fcc..be4237d 100644 --- a/source/libr2c2/route.cpp +++ b/source/libr2c2/route.cpp @@ -215,9 +215,9 @@ int Route::get_turnout(unsigned id) const unsigned Route::get_path(Track &trk) const { - if(unsigned taddr = trk.get_turnout_address()) + if(trk.get_type().is_turnout()) { - map::const_iterator i = turnouts.find(taddr); + map::const_iterator i = turnouts.find(trk.get_turnout_address()); if(i!=turnouts.end()) return i->second; }