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>2016-03-05 01:16:12 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-03-05 01:16:12 +0300
commit4e500101a7dd3ea578ca6d6f101c0d9ece7f5abc (patch)
treeb84e5af642e8f702c2bc34a26155a49284fbda9b /source/blender/blenlib/intern/lasso.c
parentfea07c1a63fdfe3bf25d77d862e83bdf024347b8 (diff)
Cleanup: quiet -Wcomma, cast to void where needed
Diffstat (limited to 'source/blender/blenlib/intern/lasso.c')
-rw-r--r--source/blender/blenlib/intern/lasso.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/lasso.c b/source/blender/blenlib/intern/lasso.c
index 25d43e9d002..710da09521a 100644
--- a/source/blender/blenlib/intern/lasso.c
+++ b/source/blender/blenlib/intern/lasso.c
@@ -71,15 +71,12 @@ bool BLI_lasso_is_edge_inside(const int mcords[][2], const unsigned int moves,
int x0, int y0, int x1, int y1,
const int error_value)
{
- int v1[2], v2[2];
- unsigned int a;
if (x0 == error_value || x1 == error_value || moves == 0) {
return false;
}
- v1[0] = x0, v1[1] = y0;
- v2[0] = x1, v2[1] = y1;
+ const int v1[2] = {x0, y0}, v2[2] = {x1, y1};
/* check points in lasso */
if (BLI_lasso_is_point_inside(mcords, moves, v1[0], v1[1], error_value)) return true;
@@ -88,7 +85,7 @@ bool BLI_lasso_is_edge_inside(const int mcords[][2], const unsigned int moves,
/* no points in lasso, so we have to intersect with lasso edge */
if (isect_seg_seg_v2_int(mcords[0], mcords[moves - 1], v1, v2) > 0) return true;
- for (a = 0; a < moves - 1; a++) {
+ for (unsigned int a = 0; a < moves - 1; a++) {
if (isect_seg_seg_v2_int(mcords[a], mcords[a + 1], v1, v2) > 0) return true;
}