]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/trainproperties.cpp
Support more complex article numbers
[r2c2.git] / source / engineer / trainproperties.cpp
index 81463d28498a6493281cecbf5558ac8fc927f5a2..efbf842c4ee10cc84368a850f42ff0738f443f8f 100644 (file)
@@ -35,9 +35,9 @@ TrainProperties::TrainProperties(Engineer &e, const GLtk::Resources &r, Train *t
        add(*(drp_type = new GLtk::Dropdown(res)));
        drp_type->set_geometry(GLtk::Geometry(60, geom.h-50, geom.w-70, 20));
 
-       const map<unsigned, VehicleType *> &vehs = engineer.get_catalogue().get_vehicles();
+       const Catalogue::VehicleMap &vehs = engineer.get_catalogue().get_vehicles();
        unsigned n = 0;
-       for(map<unsigned, VehicleType *>::const_iterator i=vehs.begin(); i!=vehs.end(); ++i)
+       for(Catalogue::VehicleMap::const_iterator i=vehs.begin(); i!=vehs.end(); ++i)
        {
                if(!i->second->is_locomotive())
                        continue;
@@ -67,7 +67,7 @@ TrainProperties::TrainProperties(Engineer &e, const GLtk::Resources &r, Train *t
        drp_new_vehicle->set_geometry(GLtk::Geometry(10, geom.h-230, geom.w-20, 20));
        drp_new_vehicle->append("(new vehicle)");
        drp_new_vehicle->set_selected_index(0);
-       for(map<unsigned, VehicleType *>::const_iterator i=vehs.begin(); i!=vehs.end(); ++i)
+       for(Catalogue::VehicleMap::const_iterator i=vehs.begin(); i!=vehs.end(); ++i)
        {
                if(i->second->is_locomotive())
                        continue;
@@ -126,8 +126,8 @@ void TrainProperties::new_vehicle_selected(unsigned n, const string &)
 
 const VehicleType &TrainProperties::get_vehicle_type(unsigned n, bool loco)
 {
-       const map<unsigned, VehicleType *> &vehs = engineer.get_catalogue().get_vehicles();
-       map<unsigned, VehicleType *>::const_iterator i = vehs.begin();
+       const Catalogue::VehicleMap &vehs = engineer.get_catalogue().get_vehicles();
+       Catalogue::VehicleMap::const_iterator i = vehs.begin();
        while(i!=vehs.end())
        {
                if(i->second->is_locomotive()==loco)