Fix warning about copying return value despite being passed by name

This commit is contained in:
Mael Rouxel-Labbé 2020-02-10 18:18:26 +01:00
parent e5ac71fd38
commit 48bf4c3f52
1 changed files with 6 additions and 9 deletions

View File

@ -312,15 +312,12 @@ class ConicCPA2
PT center () const PT center () const
{ {
CGAL_kernel_precondition (type != PARABOLA); CGAL_kernel_precondition (type != PARABOLA);
// PT p;
// replaced previous line by following hack (no idea const FT two = FT(2);
// why original version doesn't work) const FT div = -det();
typename DA::Point p;
FT two = FT(2); return PT((two*s()*u() - t()*v()) / div,
FT div = -det(); (two*r()*v() - t()*u()) / div);
dao.set( p, (two*s()*u() - t()*v()) / div,
(two*r()*v() - t()*u()) / div);
return p;
} }
Conic_type conic_type () const Conic_type conic_type () const