Use const&

This commit is contained in:
Andreas Fabri 2019-06-14 15:47:43 +02:00
parent 7a49b48019
commit e15dbd02aa
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ main( )
assert(cdt.is_valid());
int count = 0;
for (Edge e : cdt.finite_edges())
for (const Edge& e : cdt.finite_edges())
if (cdt.is_constrained(e))
++count;
std::cout << "The number of resulting constrained edges is ";

View File

@ -34,7 +34,7 @@ contexts(const CDTP& cdtp)
if(cdtp.number_of_enclosing_constraints(vp, vq) == 2){
std::cout << "subconstraint " << vp->point() << " " << vq->point()
<< " is on constraints starting at:\n";
for(CDTP::Context c : cdtp.contexts(vp,vq)){
for(const CDTP::Context& c : cdtp.contexts(vp,vq)){
std::cout << (*(c.vertices_begin()))->point() << std::endl;
}
}