diff options
author | Joshua Leung <aligorith@gmail.com> | 2018-02-21 08:59:15 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2018-02-21 15:46:08 +0300 |
commit | 63da3b79edc630d1a5e311d24bfca6506ecfdac8 (patch) | |
tree | 8e63eb7ea7923026dbe938f0a410a7503b38139c /source/blender | |
parent | ac717928ad027b3a048e6aba7e4f64e4a617d8cc (diff) |
Minor Optimisation: Terminate early if we've passed the insertion point for tRetainedKeyframes
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 7b18ee09df8..3693c3e40fb 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -3556,8 +3556,9 @@ static void posttrans_fcurve_clean(FCurve *fcu, const bool use_handle) break; } else if (rk->frame < bezt->vec[1][0]) { - /* XXX: terminate early if have passed the supposed insertion point? */ + /* Terminate early if have passed the supposed insertion point? */ printf(" %f: rk %f (@ %p) is earlier (last = %p)\n", bezt->vec[1][0], rk->frame, rk, retained_keys.last); + break; } } @@ -3626,6 +3627,7 @@ static void posttrans_fcurve_clean(FCurve *fcu, const bool use_handle) } else if (rk->frame < bezt->vec[1][0]) { /* Terminate search early - There shouldn't be anything */ + break; } } } |