CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.96k stars 1.38k forks source link

Potential duplicate lines #8401

Closed albert-github closed 6 days ago

albert-github commented 2 months ago

Inspired by issue #8348 I did a bit of a search (skipping in general test / demo/ data files) and found also some suspicious lines. With some differences I also placed a small comment.

The list: dupl.tar.gz

albert-github commented 2 months ago

In the comment https://github.com/CGAL/cgal/pull/8396#issuecomment-2277655041 with PR #8396 @afabri wrote (and to give it a bit more focus I repeated it here):

My latest commit left those open.

=== "Algebraic_kernel_for_spheres/test/Algebraic_kernel_for_spheres/include/CGAL/_test_predicates.h" ===
109a110
>            theConstruct_2_3(20, 5, 0, 100),
=== "Arrangement_on_surface_2/benchmark/data/benchArrSegments.xml" ===
152a153
>       <benchArrCgalGmpqLazyCartesianSegment/>

=== "Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h" ===
134a136
>     if (v->is_at_open_boundary() && he->source()->is_at_open_boundary()) ++he;

=== "Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h" ===
1116a1130
>     if (v->is_at_open_boundary() && he->source()->is_at_open_boundary()) ++he;

=== "Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h" ===
569a574
>         _check_pt_arcno_and_coprimality(p, -1, c);

=== "Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/circular_lines/compare" ===
153a154
> compare_xy    8 7 LARGER

=== "Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/conics/compare" ===
153a154
> compare_xy    8 7 LARGER

=== "Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/polylines/merge" ===
50a51
> are_mergeable 1 20 FALSE

=== "Boolean_set_operations_2/test/Boolean_set_operations_2/test_compilation.cpp" ===
233a236
>   gps.oriented_side(pgn_with_holes1);

AF:  (pgn_with_holes2 ??

=== "Circular_kernel_3/doc/Circular_kernel_3/CGAL/global_functions_spherical_kernel_3.h" ===
27a28
> \sa \link compare_xy_grp `CGAL::compare_xy()` \endlink
48a51
> \sa \link compare_xy_grp `CGAL::compare_xy()` \endlink
91a95
> \sa \link compare_xy_grp `CGAL::compare_xy()` \endlink

AF:  xyz ??

=== "Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h" ===
1167a1184
>   --last_iter;

(comment: also is it guaranteed here thet the operator won't fail?)

=== "Installation/cmake/modules/CGAL_Macros.cmake" ===
18a19
>     set ( ${var} ${ARGN} CACHE INTERNAL "" )
22a24
>     set ( ${var} ${ARGN} CACHE ${type} ${doc} FORCE )

=== "Intersections_2/test/Intersections_2/test_intersections_2.cpp" ===
539a540
>     check_intersection     (S(p( 0,   0), p( 10,   0)), R(p(  1,   6), p(  1,  -3)), P(1, 0));
757a759
>     check_intersection<S>  (L(p( 18,  6), p( 0,   0)), Rec(p( 2,  0), p(6,  3)));

=== "Kernel_23/test/Kernel_23/include/CGAL/_test_cls_aff_transformation_3.h" ===
491a497
>  assert( FT( translate.hm(0,1) ) / FT( translate.hm(3,3) ) == FTzero );
503a510
>  assert( FT( translate.hm(3,0) ) / FT( translate.hm(3,3) ) == FTzero );

=== "Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h" ===
483a503
>   tmp34ab = CGAL::compare_distance(t2, l1, s1, p1);