File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -154,12 +154,7 @@ class Rectf final
154
154
*/
155
155
Rectf grown (float border) const
156
156
{
157
- // If the size would be shrunk below 0, do not resize.
158
- if (m_size.width + border * 2 < 0 .f || m_size.height + border * 2 < 0 .f )
159
- return *this ;
160
-
161
- return Rectf (m_p1.x - border, m_p1.y - border,
162
- get_right () + border, get_bottom () + border);
157
+ return grown (Vector (border, border));
163
158
}
164
159
165
160
/* *
@@ -168,7 +163,7 @@ class Rectf final
168
163
* @param border The passed vector contains the horizontal amount as first component and the vertical amount
169
164
* as the second component.
170
165
*/
171
- Rectf grown (Vector border) const
166
+ Rectf grown (const Vector& border) const
172
167
{
173
168
// If the size would be shrunk below 0, do not resize.
174
169
if (m_size.width + border.x * 2 < 0 .f || m_size.height + border.y * 2 < 0 .f )
You can’t perform that action at this time.
0 commit comments