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>2020-05-04 12:50:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-05-04 12:50:06 +0300
commit9eb46d6c29edec3c888e6ebde4328b05d3f0dc6c (patch)
treeaee1d70ddea70c287c80c310d3711bffa5d19ca3 /source/blender/windowmanager/intern/wm_gesture.c
parent2addc868dee7d93daccbfb06e9cb7ee39c796370 (diff)
Cleanup: rename mcords to mcoords
- 'coords' is an abbreviation for coordinates, not 'cords'. - Rename 'moves' to 'coords_len'.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_gesture.c')
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index 71ae44297e7..9aa401722b7 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -320,24 +320,24 @@ static void draw_filled_lasso_px_cb(int x, int x_end, int y, void *user_data)
static void draw_filled_lasso(wmGesture *gt)
{
const short *lasso = (short *)gt->customdata;
- const int tot = gt->points;
- int(*moves)[2] = MEM_mallocN(sizeof(*moves) * (tot + 1), __func__);
+ const int mcoords_len = gt->points;
+ int(*mcoords)[2] = MEM_mallocN(sizeof(*mcoords) * (mcoords_len + 1), __func__);
int i;
rcti rect;
float red[4] = {1.0f, 0.0f, 0.0f, 0.0f};
- for (i = 0; i < tot; i++, lasso += 2) {
- moves[i][0] = lasso[0];
- moves[i][1] = lasso[1];
+ for (i = 0; i < mcoords_len; i++, lasso += 2) {
+ mcoords[i][0] = lasso[0];
+ mcoords[i][1] = lasso[1];
}
- BLI_lasso_boundbox(&rect, (const int(*)[2])moves, tot);
+ BLI_lasso_boundbox(&rect, (const int(*)[2])mcoords, mcoords_len);
BLI_rcti_translate(&rect, gt->winrct.xmin, gt->winrct.ymin);
BLI_rcti_isect(&gt->winrct, &rect, &rect);
BLI_rcti_translate(&rect, -gt->winrct.xmin, -gt->winrct.ymin);
- /* highly unlikely this will fail, but could crash if (tot == 0) */
+ /* Highly unlikely this will fail, but could crash if (mcoords_len == 0). */
if (BLI_rcti_is_empty(&rect) == false) {
const int w = BLI_rcti_size_x(&rect);
const int h = BLI_rcti_size_y(&rect);
@@ -348,8 +348,8 @@ static void draw_filled_lasso(wmGesture *gt)
rect.ymin,
rect.xmax,
rect.ymax,
- (const int(*)[2])moves,
- tot,
+ (const int(*)[2])mcoords,
+ mcoords_len,
draw_filled_lasso_px_cb,
&lasso_fill_data);
@@ -390,7 +390,7 @@ static void draw_filled_lasso(wmGesture *gt)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
- MEM_freeN(moves);
+ MEM_freeN(mcoords);
}
static void wm_gesture_draw_lasso(wmGesture *gt, bool filled)