diff options
author | Peter Nelson <peter1138@openttd.org> | 2021-05-04 00:24:14 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2021-05-08 09:53:55 +0100 |
commit | d8e06e590aff56c837b29ddbba3764292ea08d85 (patch) | |
tree | bb50b42e03d5e61442ce98d63001426c7dadfa56 /src/widget_type.h | |
parent | 52b16237ad863ce30746ac7efc46a9ece7e3bdd2 (diff) | |
download | openttd-d8e06e590aff56c837b29ddbba3764292ea08d85.tar.xz |
Codechange: Make GetCurrentRect() conform to usual Rect bounds, and reuse it.
Similar code is already repeated in other locations.
Diffstat (limited to 'src/widget_type.h')
-rw-r--r-- | src/widget_type.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widget_type.h b/src/widget_type.h index c50a263d6..a5bd98849 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -167,8 +167,8 @@ public: Rect r; r.left = this->pos_x; r.top = this->pos_y; - r.right = this->pos_x + this->current_x; - r.bottom = this->pos_y + this->current_y; + r.right = this->pos_x + this->current_x - 1; + r.bottom = this->pos_y + this->current_y - 1; return r; } |