]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/blockallocator.cpp
Reduce interface clutter in Layout by storing Objects in a uniform way
[r2c2.git] / source / libr2c2 / blockallocator.cpp
index acb59aeae808beab4a212b245435bf7f9c181c93..f73697a5b45381f8173b045ce70de1ac0abfd590 100644 (file)
@@ -26,7 +26,7 @@ BlockAllocator::BlockAllocator(Train &t):
        layout.signal_block_reserved.connect(sigc::mem_fun(this, &BlockAllocator::block_reserved));
        layout.signal_sensor_state_changed.connect(sigc::mem_fun(this, &BlockAllocator::sensor_state_changed));
 
-       const set<Track *> &tracks = layout.get_tracks();
+       const set<Track *> &tracks = layout.get_all<Track>();
        for(set<Track *>::const_iterator i=tracks.begin(); i!=tracks.end(); ++i)
                if((*i)->get_turnout_id())
                        (*i)->signal_path_changed.connect(sigc::hide(sigc::bind(sigc::mem_fun(this, &BlockAllocator::turnout_path_changed), sigc::ref(**i))));