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>2013-11-25 23:39:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-11-25 23:39:14 +0400
commit63caaa2b12edf0e0a47764156416fac9d43d3664 (patch)
tree39d9455df141edc2f232240da34514b0468dcc28 /source/blender/blenlib/intern
parent5928af11ef97d6d9318d3a06fe32f0d77fc48e9c (diff)
Code Cleanup: rename vars for detecting change to be more consistent
rename change/is_change/is_changed/modified -> changed also use bools over int/short/char and once accidental float.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/rct.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index d36cd3cb394..aa36433b324 100644
--- a/source/blender/blenlib/intern/rct.c
+++ b/source/blender/blenlib/intern/rct.c
@@ -413,22 +413,22 @@ void BLI_rctf_interp(rctf *rect, const rctf *rect_a, const rctf *rect_b, const f
bool BLI_rctf_clamp_pt_v(const struct rctf *rect, float xy[2])
{
- bool change = false;
- if (xy[0] < rect->xmin) { xy[0] = rect->xmin; change = true; }
- if (xy[0] > rect->xmax) { xy[0] = rect->xmax; change = true; }
- if (xy[1] < rect->ymin) { xy[1] = rect->ymin; change = true; }
- if (xy[1] > rect->ymax) { xy[1] = rect->ymax; change = true; }
- return change;
+ bool changed = false;
+ if (xy[0] < rect->xmin) { xy[0] = rect->xmin; changed = true; }
+ if (xy[0] > rect->xmax) { xy[0] = rect->xmax; changed = true; }
+ if (xy[1] < rect->ymin) { xy[1] = rect->ymin; changed = true; }
+ if (xy[1] > rect->ymax) { xy[1] = rect->ymax; changed = true; }
+ return changed;
}
bool BLI_rcti_clamp_pt_v(const struct rcti *rect, int xy[2])
{
- bool change = false;
- if (xy[0] < rect->xmin) { xy[0] = rect->xmin; change = true; }
- if (xy[0] > rect->xmax) { xy[0] = rect->xmax; change = true; }
- if (xy[1] < rect->ymin) { xy[1] = rect->ymin; change = true; }
- if (xy[1] > rect->ymax) { xy[1] = rect->ymax; change = true; }
- return change;
+ bool changed = false;
+ if (xy[0] < rect->xmin) { xy[0] = rect->xmin; changed = true; }
+ if (xy[0] > rect->xmax) { xy[0] = rect->xmax; changed = true; }
+ if (xy[1] < rect->ymin) { xy[1] = rect->ymin; changed = true; }
+ if (xy[1] > rect->ymax) { xy[1] = rect->ymax; changed = true; }
+ return changed;
}
bool BLI_rctf_compare(const struct rctf *rect_a, const struct rctf *rect_b, const float limit)