[Bf-blender-cvs] [63da3b79edc] master: Minor Optimisation: Terminate early if we've passed the insertion point for tRetainedKeyframes

Joshua Leung noreply at git.blender.org
Wed Feb 21 13:59:55 CET 2018


Commit: 63da3b79edc630d1a5e311d24bfca6506ecfdac8
Author: Joshua Leung
Date:   Wed Feb 21 18:59:15 2018 +1300
Branches: master
https://developer.blender.org/rB63da3b79edc630d1a5e311d24bfca6506ecfdac8

Minor Optimisation: Terminate early if we've passed the insertion point for tRetainedKeyframes

===================================================================

M	source/blender/editors/transform/transform_conversions.c

===================================================================

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;
 			}
 		}
 	}



More information about the Bf-blender-cvs mailing list