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

@ -230,10 +230,7 @@ SystemView::SystemView(
};
add_child(&navigation_view);
navigation_view.set_parent_rect({
{ 0, status_view_height },
{ parent_rect.width(), static_cast<ui::Dim>(parent_rect.height() - status_view_height) }
});
navigation_view.set_parent_rect({ 0, status_view_height, parent_rect.width(), parent_rect.height() - status_view_height });
navigation_view.on_view_changed = [this](const View& new_view) {
this->status_view.set_back_enabled(!this->navigation_view.is_top());
this->status_view.set_title(new_view.title());