Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-01-02 05:55:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-01-02 05:56:19 +0300
commit32c65faeb94e86af82e6e9e71ef1539fef82709b (patch)
treee1d3f47e6c06a0fa3fd7b3c5a815bba2db0d682c
parent911544c70cb0da53cb1df526e4c2cfa9f32a14be (diff)
Cleanup: redundant assignment in rect resize
-rw-r--r--source/blender/blenlib/intern/rct.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index 9d5a4630f68..ac73a981b45 100644
--- a/source/blender/blenlib/intern/rct.c
+++ b/source/blender/blenlib/intern/rct.c
@@ -420,20 +420,16 @@ void BLI_rctf_recenter(rctf *rect, float x, float y)
/* change width & height around the central location */
void BLI_rcti_resize(rcti *rect, int x, int y)
{
- rect->xmin = rect->xmax = BLI_rcti_cent_x(rect);
- rect->ymin = rect->ymax = BLI_rcti_cent_y(rect);
- rect->xmin -= x / 2;
- rect->ymin -= y / 2;
+ rect->xmin = BLI_rcti_cent_x(rect) - (x / 2);
+ rect->ymin = BLI_rcti_cent_y(rect) - (y / 2);
rect->xmax = rect->xmin + x;
rect->ymax = rect->ymin + y;
}
void BLI_rctf_resize(rctf *rect, float x, float y)
{
- rect->xmin = rect->xmax = BLI_rctf_cent_x(rect);
- rect->ymin = rect->ymax = BLI_rctf_cent_y(rect);
- rect->xmin -= x * 0.5f;
- rect->ymin -= y * 0.5f;
+ rect->xmin = BLI_rctf_cent_x(rect) - (x * 0.5f);
+ rect->ymin = BLI_rctf_cent_y(rect) - (y * 0.5f);
rect->xmax = rect->xmin + x;
rect->ymax = rect->ymin + y;
}