From: Mikko Rasa Date: Thu, 17 Jan 2013 14:26:47 +0000 (+0200) Subject: Miscellaneous compilation fixes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=850c1d571f2d2d157a873b678d86e4a5c771ba26;p=r2c2.git Miscellaneous compilation fixes --- diff --git a/source/3d/vehicletype.cpp b/source/3d/vehicletype.cpp index a2f4a34..0c64658 100644 --- a/source/3d/vehicletype.cpp +++ b/source/3d/vehicletype.cpp @@ -158,7 +158,9 @@ GL::Technique *VehicleType3D::create_technique(const map ¶ms tex->storage(GL::RGB, 2, 1); tex->set_min_filter(GL::NEAREST); tex->set_mag_filter(GL::NEAREST); - unsigned char data[6] = { color>>16, color>>8, color, color2>>16, color2>>8, color2 }; + unsigned char data[6]; + data[0] = color>>16; data[1] = color>>8; data[2] = color; + data[3] = color2>>16; data[4] = color2>>8; data[5] = color2; tex->image(0, GL::RGB, GL::UNSIGNED_BYTE, data); pass.set_texture(0, tex); diff --git a/source/libr2c2/intellibox.h b/source/libr2c2/intellibox.h index d3008d2..efdf3b2 100644 --- a/source/libr2c2/intellibox.h +++ b/source/libr2c2/intellibox.h @@ -62,7 +62,7 @@ private: ERR_NO_I2C_SPACE, ERR_LOW_TURNOUT_SPACE=0x40, ERR_LOK_HALTED, - ERR_LOK_POWER_OFF, + ERR_LOK_POWER_OFF }; enum Protocol diff --git a/source/libr2c2/speedquantizer.cpp b/source/libr2c2/speedquantizer.cpp index 9fa127c..fa7a4be 100644 --- a/source/libr2c2/speedquantizer.cpp +++ b/source/libr2c2/speedquantizer.cpp @@ -82,7 +82,7 @@ unsigned SpeedQuantizer::find_speed_step(float speed) const else return 0; } - return min(min(static_cast(low*speed/steps[low].speed), steps.size()-1), last+limit); + return min(min(low*speed/steps[low].speed, steps.size()-1), last+limit); } float f = (speed-steps[low].speed)/(steps[high].speed-steps[low].speed);