@@ -623,7 +623,7 @@ class g7x:public std::list<std::unique_ptr<segment>> {
623623 auto p (h); --p;
624624 (*h)->do_finish ((*p).get (),(*(++h)).get ());
625625 }
626- for (auto p=begin (); p!=end (); p++ )
626+ for (auto p=begin (); p!=end (); ++p )
627627 if ((*p)->radius ()<1e-3 )
628628 erase (p--);
629629 }
@@ -741,7 +741,7 @@ void g7x::pocket(int cycle, std::complex<double> location, iterator p,
741741
742742 if (cycle==2 ) {
743743 // This skips the initial roughing pass
744- for (; p!=end (); p++ ) {
744+ for (; p!=end (); ++p ) {
745745 if ((*p)->dive (location,-1e9 ,out,p==begin ()))
746746 break ;
747747 }
@@ -756,13 +756,13 @@ void g7x::pocket(int cycle, std::complex<double> location, iterator p,
756756 /* After the initial roughing pass, move along the final
757757 contour and we're done
758758 */
759- for (; p!=end (); p++ )
759+ for (; p!=end (); ++p )
760760 (*p)->climb_only (location,out);
761761 } else {
762762 /* Move along the final contour until a pocket is found,
763763 then start cutting that pocket
764764 */
765- for (; p!=end (); p++ ) {
765+ for (; p!=end (); ++p ) {
766766 if ((*p)->climb (location,out)) {
767767 if (cycle==3 ) {
768768 if (imag (location)>imag (pocket_starts.back ())
@@ -791,11 +791,11 @@ void g7x::pocket(int cycle, std::complex<double> location, iterator p,
791791 /* Our x coordinate is beyond the current segment, move onto
792792 the next
793793 */
794- p++ ;
794+ ++p ;
795795 continue ;
796796 }
797797
798- for (auto ip=p; ip!=end (); ip++ ) {
798+ for (auto ip=p; ip!=end (); ++ip ) {
799799 segment::intersections_t is;
800800 (*ip)->intersection_z (location.imag (),is);
801801 if (is.empty ())
@@ -857,13 +857,13 @@ void g7x::add_distance(double distance) {
857857 if (distance<0 )
858858 max_distance=-max_distance;
859859
860- for (auto p=begin (); p!=end (); p++ ) {
860+ for (auto p=begin (); p!=end (); ++p ) {
861861 (*p)->offset (max_distance);
862862 if ((*p)->radius ()<1e-3 )
863863 erase (p--);
864864 }
865865
866- for (auto p=begin (); p!=--end (); p++ ) {
866+ for (auto p=begin (); p!=--end (); ++p ) {
867867 auto n=p; ++n;
868868 if (real ((*p)->ep ()-(*n)->sp ())>1e-2 ) {
869869 // insert connecting arc
@@ -874,11 +874,11 @@ void g7x::add_distance(double distance) {
874874 auto center=(s->ep ()+e->sp ())/2.0 ;
875875 emplace (n, std::make_unique<round_segment>(
876876 distance>0 ,(*p)->ep (),center,(*n)->sp ()));
877- p++ ;
877+ ++p ;
878878 }
879879 }
880880
881- for (auto p=begin (); p!=--end (); p++ ) {
881+ for (auto p=begin (); p!=--end (); ++p ) {
882882 if (!(*p)->monotonic ()) {
883883 std::cout << " Oops " << (*p)->sp ()-(*p)->ep () << std::endl;
884884 auto pp=p; --pp;
@@ -897,7 +897,7 @@ void g7x::add_distance(double distance) {
897897 }
898898 current_distance+=max_distance;
899899 }
900- for (auto p=begin (); p!=--end (); p++ ) {
900+ for (auto p=begin (); p!=--end (); ++p ) {
901901 auto n=p; ++n;
902902 auto mid=((*p)->ep ()+(*n)->sp ())/2.0 ;
903903 (*p)->ep ()=(*n)->sp ()=mid;
0 commit comments