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>2012-10-05 19:44:11 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-05 19:44:11 +0400
commitdb70bfc206538a9582e17a3eedcd1923e3f8d2c8 (patch)
treef42791067d415a2c72683a6dc58b7540a63b08c0 /source/blender/blenlib/intern/lasso.c
parentd3cdaca648740ec6e11aebecc243442aa5ae7142 (diff)
code cleanup: use functions to initialize selection user data structs, use radius-squared for circle select comparisons.
edge_fully_inside_rect() & edge_inside_rect() args were shorts when all callers were passing ints.
Diffstat (limited to 'source/blender/blenlib/intern/lasso.c')
-rw-r--r--source/blender/blenlib/intern/lasso.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/lasso.c b/source/blender/blenlib/intern/lasso.c
index 7df4da80e16..5cd8bb813a1 100644
--- a/source/blender/blenlib/intern/lasso.c
+++ b/source/blender/blenlib/intern/lasso.c
@@ -37,7 +37,7 @@
#include "BLI_lasso.h" /* own include */
-void BLI_lasso_boundbox(rcti *rect, int mcords[][2], short moves)
+void BLI_lasso_boundbox(rcti *rect, const int mcords[][2], const short moves)
{
short a;
@@ -53,14 +53,14 @@ void BLI_lasso_boundbox(rcti *rect, int mcords[][2], short moves)
}
-int BLI_lasso_is_point_inside(int mcords[][2], short moves,
+int BLI_lasso_is_point_inside(const int mcords[][2], const short moves,
const int sx, const int sy,
const int error_value)
{
/* we do the angle rule, define that all added angles should be about zero or (2 * PI) */
float angletot = 0.0, dot, ang, cross, fp1[2], fp2[2];
int a;
- int *p1, *p2;
+ const int *p1, *p2;
if (sx == error_value) {
return 0;
@@ -100,7 +100,7 @@ int BLI_lasso_is_point_inside(int mcords[][2], short moves,
}
/* edge version for lasso select. we assume boundbox check was done */
-int BLI_lasso_is_edge_inside(int mcords[][2], short moves,
+int BLI_lasso_is_edge_inside(const int mcords[][2], const short moves,
int x0, int y0, int x1, int y1,
const int error_value)
{