diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2021-07-01 13:48:03 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2021-07-01 13:48:03 +0300 |
commit | d35969a74ff7a71fc0ca233ae65a2f1c47eb9a25 (patch) | |
tree | 7d12896c3a481c9d0f43f5708624b6a7cddf204e /source/blender/editors/gpencil/gpencil_data.c | |
parent | efe2247e3cdb1006a5b1d87d76a96dc6a63ad12c (diff) | |
parent | 229c0580e2915b2dc349069ee7094d322408641f (diff) |
Merge branch 'master' into geometry-nodes-unnamed-attributes
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_data.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_data.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index e11ed927cbf..e272f46d13d 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -871,20 +871,20 @@ void GPENCIL_OT_frame_clean_loose(wmOperatorType *ot) } /* ********************* Clean Duplicated Frames ************************** */ -static bool gpencil_frame_is_equal(bGPDframe *gpf_a, bGPDframe *gpf_b) +static bool gpencil_frame_is_equal(const bGPDframe *gpf_a, const bGPDframe *gpf_b) { if ((gpf_a == NULL) || (gpf_b == NULL)) { return false; } /* If the number of strokes is different, cannot be equal. */ - int totstrokes_a = BLI_listbase_count(&gpf_a->strokes); - int totstrokes_b = BLI_listbase_count(&gpf_b->strokes); + const int totstrokes_a = BLI_listbase_count(&gpf_a->strokes); + const int totstrokes_b = BLI_listbase_count(&gpf_b->strokes); if ((totstrokes_a == 0) || (totstrokes_b == 0) || (totstrokes_a != totstrokes_b)) { return false; } /* Loop all strokes and check. */ - bGPDstroke *gps_a = gpf_a->strokes.first; - bGPDstroke *gps_b = gpf_b->strokes.first; + const bGPDstroke *gps_a = gpf_a->strokes.first; + const bGPDstroke *gps_b = gpf_b->strokes.first; for (int i = 0; i < totstrokes_a; i++) { /* If the number of points is different, cannot be equal. */ if (gps_a->totpoints != gps_b->totpoints) { @@ -924,8 +924,8 @@ static bool gpencil_frame_is_equal(bGPDframe *gpf_a, bGPDframe *gpf_b) /* Loop points and check if equals or not. */ for (int p = 0; p < gps_a->totpoints; p++) { - bGPDspoint *pt_a = &gps_a->points[p]; - bGPDspoint *pt_b = &gps_b->points[p]; + const bGPDspoint *pt_a = &gps_a->points[p]; + const bGPDspoint *pt_b = &gps_b->points[p]; if (!equals_v3v3(&pt_a->x, &pt_b->x)) { return false; } |