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:
authorJoshua Leung <aligorith@gmail.com>2014-01-28 05:41:33 +0400
committerJoshua Leung <aligorith@gmail.com>2014-02-03 10:23:49 +0400
commitb320139c674325c802b75a136f346d2cf83730da (patch)
tree7307e5c4b7ac3e2eaa5d46513eb63c82e4ebd1b9 /source/blender/editors/gpencil
parent1dc1d92dabe08fd78791ab02295c65adefdb61c8 (diff)
Use bool where appropriate
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 462e0b527fe..d808c91d4e7 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -234,31 +234,31 @@ static void gp_get_3d_reference(tGPsdata *p, float vec[3])
/* Stroke Editing ---------------------------- */
/* check if the current mouse position is suitable for adding a new point */
-static short gp_stroke_filtermval(tGPsdata *p, const int mval[2], int pmval[2])
+static bool gp_stroke_filtermval(tGPsdata *p, const int mval[2], int pmval[2])
{
int dx = abs(mval[0] - pmval[0]);
int dy = abs(mval[1] - pmval[1]);
/* if buffer is empty, just let this go through (i.e. so that dots will work) */
if (p->gpd->sbuffer_size == 0)
- return 1;
+ return true;
/* check if mouse moved at least certain distance on both axes (best case)
* - aims to eliminate some jitter-noise from input when trying to draw straight lines freehand
*/
else if ((dx > MIN_MANHATTEN_PX) && (dy > MIN_MANHATTEN_PX))
- return 1;
+ return true;
/* check if the distance since the last point is significant enough
* - prevents points being added too densely
* - distance here doesn't use sqrt to prevent slowness... we should still be safe from overflows though
*/
else if ((dx * dx + dy * dy) > MIN_EUCLIDEAN_PX * MIN_EUCLIDEAN_PX)
- return 1;
+ return true;
/* mouse 'didn't move' */
else
- return 0;
+ return false;
}
/* convert screen-coordinates to buffer-coordinates */