From eec0d93a2ff9a7b2cd8e265585cfcdfeeab59c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 12 Mar 2015 14:04:35 +0100 Subject: [PATCH] move function before it is used --- .../CGAL/boost/graph/Euler_operations.h | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/Euler_operations.h b/BGL/include/CGAL/boost/graph/Euler_operations.h index a87e2fb2616..828f584020c 100644 --- a/BGL/include/CGAL/boost/graph/Euler_operations.h +++ b/BGL/include/CGAL/boost/graph/Euler_operations.h @@ -626,6 +626,22 @@ void remove_face(typename boost::graph_traits::halfedge_descriptor h, remove_edge(edge(h, g), g); } +/** +* adds and returns the edge `e` connecting `s` and `t` +* halfedge(e, g) has s as source and t as target +*/ +template +typename boost::graph_traits::edge_descriptor +add_edge(typename boost::graph_traits::vertex_descriptor s, + typename boost::graph_traits::vertex_descriptor t, + Graph& g) +{ + typename boost::graph_traits::edge_descriptor e = add_edge(g); + set_target(halfedge(e, g), t, g); + set_target(opposite(halfedge(e, g), g), s, g); + return e; +} + /** * if possible, adds a new face with vertices from a range with value type * `boost::graph_traits::vertex_descriptor`. @@ -799,21 +815,6 @@ add_face(const VertexRange& vr, Graph& g) return f; } -/** -* adds and returns the edge `e` connecting `s` and `t` -* halfedge(e, g) has s as source and t as target -*/ -template -typename boost::graph_traits::edge_descriptor -add_edge(typename boost::graph_traits::vertex_descriptor s, - typename boost::graph_traits::vertex_descriptor t, - Graph& g) -{ - typename boost::graph_traits::edge_descriptor e = add_edge(g); - set_target(halfedge(e, g), t, g); - set_target(opposite(halfedge(e, g), g), s, g); - return e; -} /** * removes the incident face of `h` and changes all halfedges incident to the face into border halfedges. See `remove_face(g,h)` for a more generalized variant.