File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 2929 */
3030
3131#include " ../include/KeyFrame.h"
32+ #include < utility>
3233
3334using namespace std ;
3435using namespace openshot ;
@@ -904,17 +905,12 @@ void Keyframe::ScalePoints(double scale)
904905void Keyframe::FlipPoints ()
905906{
906907 // Loop through each point
907- std::vector<Point> FlippedPoints;
908- for (int64_t point_index = 0 , reverse_index = Points.size () - 1 ; point_index < Points.size (); point_index++, reverse_index--) {
908+ for (int64_t point_index = 0 , reverse_index = Points.size () - 1 ; point_index < reverse_index; point_index++, reverse_index--) {
909909 // Flip the points
910- Point p = Points[point_index];
911- p.co .Y = Points[reverse_index].co .Y ;
912- FlippedPoints.push_back (p);
910+ using std::swap;
911+ swap (Points[point_index].co .Y , Points[reverse_index].co .Y );
913912 }
914913
915- // Swap vectors
916- Points.swap (FlippedPoints);
917-
918914 // Mark for re-processing
919915 needs_update = true ;
920916}
You can’t perform that action at this time.
0 commit comments