]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/blockallocator.cpp
Prefer is_turnout() when checking if a track is, in fact, a turnout
[r2c2.git] / source / libr2c2 / blockallocator.cpp
index 6e2a11cde0bedf77295b089f97961d8467859c98..5a410ff20de0af908df94952d6d2bdb46348e14f 100644 (file)
@@ -42,7 +42,7 @@ BlockAllocator::BlockAllocator(Train &t):
 
        const set<Track *> &tracks = layout.get_all<Track>();
        for(set<Track *>::const_iterator i=tracks.begin(); i!=tracks.end(); ++i)
-               if((*i)->get_turnout_address())
+               if((*i)->get_type().is_turnout())
                {
                        (*i)->signal_path_changing.connect(sigc::hide(sigc::bind(sigc::mem_fun(this, &BlockAllocator::turnout_path_changing), sigc::ref(**i))));
                        (*i)->signal_path_changed.connect(sigc::hide(sigc::bind(sigc::mem_fun(this, &BlockAllocator::turnout_path_changed), sigc::ref(**i))));