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-08-18 20:16:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-18 20:16:13 +0400
commit27b4b45543c0f7690a1978a60591a0b5c0f1adbb (patch)
tree14c54494059de30d8d4c8a24ec8400b8bcc83ff5 /source/blender/editors/gpencil/gpencil_paint.c
parente982e9b04f13be046d194643ed28aaedd6181f3b (diff)
utility functions: BLI_findptr, BLI_rfindptr --- use for finding an item in a linked list by a pointer.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index fd98dd83a7d..d98f4891dc5 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1667,14 +1667,7 @@ static int gpencil_draw_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int gpencil_area_exists(bContext *C, ScrArea *sa_test)
{
bScreen *sc = CTX_wm_screen(C);
- ScrArea *sa;
-
- for (sa = sc->areabase.first; sa; sa = sa->next) {
- if (sa == sa_test)
- return 1;
- }
-
- return 0;
+ return (BLI_findindex(&sc->areabase, sa_test) != -1);
}
static tGPsdata *gpencil_stroke_begin(bContext *C, wmOperator *op)