]> git.tdb.fi Git - r2c2.git/commitdiff
Add target type to all lexical_casts
authorMikko Rasa <tdb@tdb.fi>
Thu, 17 Jan 2013 12:19:14 +0000 (14:19 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 17 Jan 2013 12:22:31 +0000 (14:22 +0200)
source/3d/vehicletype.cpp
source/designer/designer.cpp
source/designer/trackproperties.cpp
source/designer/zoneproperties.cpp
source/engineer/trainproperties.cpp
source/libr2c2/articlenumber.cpp

index 620e6d807a8332d2f02493a0105139b83cf953c2..427c29fe91664aa98030487f19d299128531a187 100644 (file)
@@ -100,9 +100,9 @@ GL::Object *VehicleType3D::get_object(const string &name)
                        string kind = name.substr(1, colon-1);
 
                        map<string, string> params;
-                       params["length"] = lexical_cast(type.get_length()*1000);
-                       params["width"] = lexical_cast(type.get_width()*1000);
-                       params["height"] = lexical_cast(type.get_height()*1000);
+                       params["length"] = lexical_cast<string>(type.get_length()*1000);
+                       params["width"] = lexical_cast<string>(type.get_width()*1000);
+                       params["height"] = lexical_cast<string>(type.get_height()*1000);
                        if(colon!=string::npos)
                        {
                                string::size_type start = colon+1;
index d73ef70ba36833dc40cd485e412487a2dd261d17..0effc933f8d110de8e1d52b4199fa290422ba562 100644 (file)
@@ -562,14 +562,14 @@ void Designer::update_track_icon(Track3D &track)
        if(unsigned sid = track.get_track().get_sensor_id())
        {
                overlay->add_graphic(track, "sensor");
-               overlay->set_label(track, lexical_cast(sid));
+               overlay->set_label(track, lexical_cast<string>(sid));
        }
        else if(unsigned tid = track.get_track().get_turnout_id())
        {
                if(tid<0x800)
                {
                        overlay->add_graphic(track, "turnout");
-                       overlay->set_label(track, lexical_cast(tid));
+                       overlay->set_label(track, lexical_cast<string>(tid));
                }
        }
 }
index 8d21bfc36ad9ba923967f76263b2b89354a94785..cdb5cb0855b5b62a3c1e37eb0b013b040c1d5b89 100644 (file)
@@ -43,7 +43,7 @@ TrackProperties::TrackProperties(const Selection &s):
        if(selection.size()==1)
        {
                if(unsigned tid = selection.get_track()->get_turnout_id())
-                       ent_turnout_id->set_text(lexical_cast(tid));
+                       ent_turnout_id->set_text(lexical_cast<string>(tid));
        }
 
        const set<Track *> &tracks = selection.get_tracks();
@@ -60,7 +60,7 @@ TrackProperties::TrackProperties(const Selection &s):
        }
 
        if(sensor_id>=0)
-               ent_sensor_id->set_text(lexical_cast(sensor_id));
+               ent_sensor_id->set_text(lexical_cast<string>(sensor_id));
 }
 
 void TrackProperties::on_response(int code)
index 91b8868e48f14b47fb31670efca516d81bde9c4e..63cda25a1c6261663135bb2b3a348bfb8471e0bc 100644 (file)
@@ -38,7 +38,7 @@ ZoneProperties::ZoneProperties(Zone &z):
        add(*(lbl = new GLtk::Label("Number")));
        lbl->set_geometry(GLtk::Geometry(170, geom.h-95, 70, 20));
 
-       add(*(ent_number = new GLtk::Entry(lexical_cast(zone.get_number()))));
+       add(*(ent_number = new GLtk::Entry(lexical_cast<string>(zone.get_number()))));
        ent_number->set_geometry(GLtk::Geometry(240, geom.h-95, 50, 20));
 
        GLtk::Button *btn;
index 67e096a8ea84b6e1cce858e97fcc831eb24289b8..360923514b40297dd46440d1ea0864cccd064bf1 100644 (file)
@@ -87,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);
 
index 6952ccb9983eda2186ca3ce1edbf927cb3606270..dd19eb5710e1ab0b7d1d719ef0969b1545cdd08f 100644 (file)
@@ -48,7 +48,7 @@ string ArticleNumber::str() const
                if(!result.empty())
                        result += '-';
 
-               result += lexical_cast(i->number);
+               result += lexical_cast<string>(i->number);
                if(i->letter)
                        result += i->letter;
        }