]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/locomotive.cpp
Style fixes, including:
[r2c2.git] / source / libmarklin / locomotive.cpp
index fe236a515f0fa783dbbb0f1e92022c9b86eb0ebb..0de0110f3cafd673ec55347ec3fb71c9e987cc74 100644 (file)
@@ -90,17 +90,17 @@ void Locomotive::send_command(bool setf)
                        if((funcs>>i)&2)
                                cmd[4]|=(1<<i);
        }
-       control.command(string(cmd,5));
+       control.command(string(cmd, 5));
 }
 
 void Locomotive::status_reply(Error err, const string &reply)
 {
        if(err==ERR_NO_ERROR)
        {
-               if((unsigned char)reply[0]<=1)
+               if(static_cast<unsigned char>(reply[0])<=1)
                        speed=0;
                else
-                       speed=(unsigned char)reply[0]*2/19+1;
+                       speed=static_cast<unsigned char>(reply[0])*2/19+1;
                reverse=(reply[1]&0x20)?false:true;
                funcs=(reply[1]&0xF)<<1;
                if(reply[1]&0x10)