Fixed various compiler warnings.

This commit is contained in:
hiker 2017-05-09 09:34:37 +10:00
parent 3a176f818c
commit 03f4b76a32
5 changed files with 7 additions and 7 deletions

View File

@ -95,7 +95,7 @@ namespace
{
v *= (1.0f/255.0f);
if( v <= 0.04045f )
v = v * (1.0f/12.92);
v = v * (1.0f/12.92f);
else
v = pow( ( v + 0.055f ) * (1.0f/1.055f), 2.4f );
return v;

View File

@ -225,7 +225,7 @@ public:
{
const unsigned width = irr_driver->getActualScreenSize().Width;
const unsigned height = irr_driver->getActualScreenSize().Height;
core::dimension2du dim(width * 0.75f, height * 0.05f);
core::dimension2du dim(int(width * 0.75f), int(height * 0.05f));
int x = (width - dim.Width) / 2;
int y = height - int(1.5f * dim.Height);
m_area = irr::core::recti(x, y, x + dim.Width,

View File

@ -108,8 +108,8 @@ void ScreenKeyboard::init()
const core::dimension2d<u32>& frame_size = irr_driver->getFrameSize();
int margin = 15;
int w = frame_size.Width * m_percent_width;
int h = frame_size.Height * m_percent_height;
int w = int(frame_size.Width * m_percent_width);
int h = int(frame_size.Height * m_percent_height);
int x = frame_size.Width/2 - w/2;
int y = frame_size.Height - h - margin;

View File

@ -162,7 +162,7 @@ void MultitouchSettingsDialog::updateValues()
CheckBoxWidget* buttons_en = getWidget<CheckBoxWidget>("buttons_enabled");
assert(buttons_en != NULL);
buttons_en->setState(UserConfigParams::m_multitouch_mode);
buttons_en->setState(UserConfigParams::m_multitouch_mode!=0);
CheckBoxWidget* accelerometer;
accelerometer = getWidget<CheckBoxWidget>("accelerometer_disabled");

View File

@ -271,8 +271,8 @@ void RaceGUIMultitouch::drawMultitouchSteering(const AbstractKart* kart,
float scale = UserConfigParams::m_multitouch_scale *
(float)(irr_driver->getActualScreenSize().Height) / 720.0f;
m_race_gui->drawEnergyMeter(button->x + button->width * 1.15f,
button->y + button->height * 1.35f,
m_race_gui->drawEnergyMeter(int(button->x + button->width * 1.15f),
int(button->y + button->height * 1.35f),
kart, viewport,
core::vector2df(scale, scale));
}