]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/trainproperties.cpp
Add basic support for signals
[r2c2.git] / source / engineer / trainproperties.cpp
index 9686dee485527574cd2b1f78b3c111f3b46a1f09..360923514b40297dd46440d1ea0864cccd064bf1 100644 (file)
@@ -1,12 +1,5 @@
-/* $Id$
-
-This file is part of R²C²
-Copyright © 2006-2010  Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #include <msp/gltk/label.h>
-#include <msp/strings/formatter.h>
+#include <msp/strings/format.h>
 #include <msp/strings/lexicalcast.h>
 #include "libr2c2/driver.h"
 #include "libr2c2/vehicle.h"
@@ -94,7 +87,7 @@ TrainProperties::TrainProperties(Engineer &e, Train *t):
 
        if(train)
        {
-               ent_addr->set_text(lexical_cast(train->get_address()));
+               ent_addr->set_text(lexical_cast<string>(train->get_address()));
                ent_name->set_text(train->get_name());
                drp_priority->set_selected_index(train->get_priority()+2);
 
@@ -178,5 +171,5 @@ const VehicleType &TrainProperties::get_vehicle_type(unsigned n, bool loco)
                ++i;
        }
 
-       throw InvalidParameterValue("Vehicle type index out of range");
+       throw out_of_range("TrainProperties::get_vehicle_type");
 }