Fix two warnings. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@6410 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-07-31 01:53:16 +00:00
parent fe05c5dcc1
commit 2a75137f79

View file

@ -5423,7 +5423,7 @@ static void Menu_RunInput_EntryRangeFloat_MovementArbitrary(MenuEntry_t *entry,
if (object->flags & EnforceIntervals) if (object->flags & EnforceIntervals)
{ {
float const range = object->max - object->min; float const range = object->max - object->min;
float const maxInterval = object->steps - 1; float const maxInterval = (float)(object->steps - 1);
float const newValueIndex = rintf((newValue - object->min) * maxInterval / range); float const newValueIndex = rintf((newValue - object->min) * maxInterval / range);
newValue = newValueIndex * range / maxInterval + object->min; newValue = newValueIndex * range / maxInterval + object->min;
} }
@ -5435,7 +5435,7 @@ static void Menu_RunInput_EntryRangeFloat_Movement(MenuEntry_t *entry, MenuRange
{ {
float const oldValue = *object->variable; float const oldValue = *object->variable;
float const range = object->max - object->min; float const range = object->max - object->min;
float const maxInterval = object->steps - 1; float const maxInterval = (float)(object->steps - 1);
float newValueIndex = rintf((oldValue - object->min) * maxInterval / range); float newValueIndex = rintf((oldValue - object->min) * maxInterval / range);
float const newValueProjected = newValueIndex * range / maxInterval + object->min; float const newValueProjected = newValueIndex * range / maxInterval + object->min;