summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2023-02-02 19:00:07 +0100
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2023-02-02 19:09:14 +0100
commit6743ac34d334f6067b80456dbf0b2e1a4d99d57b (patch)
treeb9ce1d39b33cf77f025acb3f17f8c64f55068887 /core
parentdb8c85a75ff0a52eaa8b80d450dc6c1d84b4d631 (diff)
Simplify Viewport::_set_size
`Viewport.to_screen_rect` is used only in a single location to compare it to `Rect2i()`. When called from `SubViewport`, `to_screen_rect` is always equal to `Rect2i()`. When called from `Window`, `to_screen_rect` is always different from `Rect2i()`. So the comparison `to_screen_rect != Rect2i()` can be replaced by `Object::cast_to<Window>(this)`. This allows the removal of `Viewport.to_screen_rect` and the simplification of `Viewport::_set_size`.
Diffstat (limited to 'core')
0 files changed, 0 insertions, 0 deletions