]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/trainpanel.cpp
Code reformatting: add spaces around assignment operators
[r2c2.git] / source / engineer / trainpanel.cpp
index 9f3bf1a95f1c8303b8b6b432c6803f19326d3e4f..b47093468cac16197a4bd890fe588f4010efb902 100644 (file)
@@ -44,21 +44,21 @@ TrainPanel::TrainPanel(Engineer &e, const GLtk::Resources &r, Train &t):
 
        GLtk::Button *btn;
 
-       const map<unsigned, string> &funcs=train.get_locomotive().get_type().get_functions();
-       unsigned x=10;
+       const map<unsigned, string> &funcs = train.get_locomotive().get_type().get_functions();
+       unsigned x = 10;
        for(map<unsigned, string>::const_iterator i=funcs.begin(); i!=funcs.end(); ++i, x+=40)
        {
-               string fname=i->second;
-               fname[0]=toupper(fname[0]);
+               string fname = i->second;
+               fname[0] = toupper(fname[0]);
                add(*(btn=new GLtk::Button(res, fname)));
                btn->set_geometry(GLtk::Geometry(x, 68, 40, 24));
                btn->signal_clicked.connect(sigc::bind(sigc::mem_fun(this, &TrainPanel::func_clicked), i->first));
 
-               GLtk::Indicator *ind=new GLtk::Indicator(res);
+               GLtk::Indicator *ind = new GLtk::Indicator(res);
                add(*ind);
                ind->set_geometry(GLtk::Geometry(x, 92, 40, 12));
                ind->set_active(train.get_locomotive().get_function(i->first));
-               ind_funcs[i->first]=ind;
+               ind_funcs[i->first] = ind;
        }
        train.get_locomotive().signal_function_changed.connect(sigc::mem_fun(this, &TrainPanel::loco_function_changed));
 
@@ -87,7 +87,7 @@ void TrainPanel::loco_speed_changed(unsigned speed)
 
 void TrainPanel::loco_function_changed(unsigned func, bool value)
 {
-       map<unsigned, GLtk::Indicator *>::iterator i=ind_funcs.find(func);
+       map<unsigned, GLtk::Indicator *>::iterator i = ind_funcs.find(func);
        if(i!=ind_funcs.end())
                i->second->set_active(value);
 }