Remove a lot of static_cast<>s involving UI structs.

Also starting to get religion on using unsigned integers only when I want their wrapping/modulus behavior.
This commit is contained in:
Jared Boone 2016-11-29 10:13:56 -08:00
parent 4c8550bb7d
commit 3f94591083
11 changed files with 28 additions and 76 deletions

View file

@ -523,9 +523,9 @@ bool ImageButton::on_touch(const TouchEvent event) {
OptionsField::OptionsField(
Point parent_pos,
size_t length,
int length,
options_t options
) : Widget { { parent_pos, { static_cast<ui::Dim>(8 * length), 16 } } },
) : Widget { { parent_pos, { 8 * length, 16 } } },
length_ { length },
options { options }
{
@ -594,11 +594,11 @@ bool OptionsField::on_touch(const TouchEvent event) {
NumberField::NumberField(
Point parent_pos,
size_t length,
int length,
range_t range,
int32_t step,
char fill_char
) : Widget { { parent_pos, { static_cast<ui::Dim>(8 * length), 16 } } },
) : Widget { { parent_pos, { 8 * length, 16 } } },
range { range },
step { step },
length_ { length },