mesh_iterator.patch 1.1 KB

12345678910111213141516171819202122
  1. diff -r c8cbec41cd35 include/carve/mesh.hpp
  2. --- a/include/carve/mesh.hpp Thu Dec 01 15:51:44 2011 -0500
  3. +++ b/include/carve/mesh.hpp Thu Jan 12 00:19:58 2012 +0600
  4. @@ -719,13 +719,13 @@
  5. void rev(size_t n);
  6. void adv(int n);
  7. - FaceIter operator++(int) { FaceIter tmp = *this; fwd(1); return tmp; }
  8. - FaceIter operator+(int v) { FaceIter tmp = *this; adv(v); return tmp; }
  9. + FaceIter operator++(int) { FaceIter tmp = *this; tmp.fwd(1); return tmp; }
  10. + FaceIter operator+(int v) { FaceIter tmp = *this; tmp.adv(v); return tmp; }
  11. FaceIter &operator++() { fwd(1); return *this; }
  12. FaceIter &operator+=(int v) { adv(v); return *this; }
  13. - FaceIter operator--(int) { FaceIter tmp = *this; rev(1); return tmp; }
  14. - FaceIter operator-(int v) { FaceIter tmp = *this; adv(-v); return tmp; }
  15. + FaceIter operator--(int) { FaceIter tmp = *this; tmp.rev(1); return tmp; }
  16. + FaceIter operator-(int v) { FaceIter tmp = *this; tmp.adv(-v); return tmp; }
  17. FaceIter &operator--() { rev(1); return *this; }
  18. FaceIter &operator-=(int v) { adv(-v); return *this; }