Codechange: Make GetCurrentRect() conform to usual Rect bounds, and reuse it.

Similar code is already repeated in other locations.
This commit is contained in:
Peter Nelson
2021-05-04 00:24:14 +01:00
committed by PeterN
parent 52b16237ad
commit d8e06e590a
5 changed files with 9 additions and 28 deletions

View File

@@ -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;
}