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-09-18 07:15:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-18 07:15:12 +0400
commita4ff2b914049f3c7af6b06034f7a569b19ad8e7a (patch)
tree1226954b80dd48c84c672ee5f386e657a13b48cd /source/blender/editors/mask/mask_add.c
parent7a06630411be281c775136cddad1efc745e9f2e0 (diff)
code cleanup: warnings
Diffstat (limited to 'source/blender/editors/mask/mask_add.c')
-rw-r--r--source/blender/editors/mask/mask_add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c
index 7fe1ac09df6..a254a6a9278 100644
--- a/source/blender/editors/mask/mask_add.c
+++ b/source/blender/editors/mask/mask_add.c
@@ -64,7 +64,7 @@ static int find_nearest_diff_point(const bContext *C, Mask *mask, const float no
MaskLayer *masklay, *point_masklay;
MaskSpline *point_spline;
MaskSplinePoint *point = NULL;
- float dist, co[2];
+ float dist = FLT_MAX, co[2];
int width, height;
float u;
float scalex, scaley;
@@ -125,7 +125,7 @@ static int find_nearest_diff_point(const bContext *C, Mask *mask, const float no
cur_dist = dist_to_line_segment_v2(co, a, b);
- if (point == NULL || cur_dist < dist) {
+ if (cur_dist < dist) {
if (tangent)
sub_v2_v2v2(tangent, &diff_points[2 * i + 2], &diff_points[2 * i]);