From decb89629930bb39daa2e97099d8ca73869bd5a6 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Thu, 26 Nov 1998 16:13:46 +0000 Subject: [PATCH] fix signed <-> unsigned comparison warning on gcc. --- .../CGAL/All_furthest_neighbors_traits_2.h | 2 -- .../include/CGAL/Cartesian_matrix.h | 2 -- .../include/CGAL/Dynamic_matrix.h | 2 -- .../include/CGAL/Extremal_polygon_traits_2.h | 4 --- .../include/CGAL/Iso_square_static_2.h | 2 -- .../include/CGAL/Pierce_rectangles_2_traits.h | 6 ----- .../include/CGAL/Transform_iterator.h | 2 -- .../include/CGAL/all_furthest_neighbors_2.h | 2 -- .../include/CGAL/monotone_matrix_search.h | 2 -- .../include/CGAL/pierce_rectangles_2.h | 26 +++---------------- .../include/CGAL/rectangular_p_center_2.h | 13 ---------- .../CGAL/rectangular_p_center_2_traits.h | 7 ----- 12 files changed, 4 insertions(+), 66 deletions(-) diff --git a/Packages/Matrix_search/include/CGAL/All_furthest_neighbors_traits_2.h b/Packages/Matrix_search/include/CGAL/All_furthest_neighbors_traits_2.h index 30351542ae7..d108cb0ea81 100644 --- a/Packages/Matrix_search/include/CGAL/All_furthest_neighbors_traits_2.h +++ b/Packages/Matrix_search/include/CGAL/All_furthest_neighbors_traits_2.h @@ -27,9 +27,7 @@ #if ! (CGAL_ALL_FURTHEST_NEIGHBORS_TRAITS_2_H) #define CGAL_ALL_FURTHEST_NEIGHBORS_TRAITS_2_H 1 -#ifndef CGAL_OPTIMISATION_ASSERTIONS_H #include -#endif // CGAL_OPTIMISATION_ASSERTIONS_H //!!! this should go into function_objects.h #ifndef CGAL_PROTECT_FUNCTION_H #include diff --git a/Packages/Matrix_search/include/CGAL/Cartesian_matrix.h b/Packages/Matrix_search/include/CGAL/Cartesian_matrix.h index d576a4385f3..a76a0e6c1c5 100644 --- a/Packages/Matrix_search/include/CGAL/Cartesian_matrix.h +++ b/Packages/Matrix_search/include/CGAL/Cartesian_matrix.h @@ -30,9 +30,7 @@ #ifndef CGAL_BASIC_H #include #endif // CGAL_BASIC_H -#ifndef CGAL_OPTIMISATION_ASSERTIONS_H #include -#endif // CGAL_OPTIMISATION_ASSERTIONS_H template < class Operation, class RandomAccessIC_row, diff --git a/Packages/Matrix_search/include/CGAL/Dynamic_matrix.h b/Packages/Matrix_search/include/CGAL/Dynamic_matrix.h index 168eff5fc83..72b88ffdaff 100644 --- a/Packages/Matrix_search/include/CGAL/Dynamic_matrix.h +++ b/Packages/Matrix_search/include/CGAL/Dynamic_matrix.h @@ -27,9 +27,7 @@ #if ! (CGAL_DYNAMIC_MATRIX_H) #define CGAL_DYNAMIC_MATRIX_H 1 -#ifndef CGAL_OPTIMISATION_ASSERTIONS_H #include -#endif // CGAL_OPTIMISATION_ASSERTIONS_H template < class Matrix > class CGAL_Dynamic_matrix diff --git a/Packages/Matrix_search/include/CGAL/Extremal_polygon_traits_2.h b/Packages/Matrix_search/include/CGAL/Extremal_polygon_traits_2.h index 538a1a016d5..141139745be 100644 --- a/Packages/Matrix_search/include/CGAL/Extremal_polygon_traits_2.h +++ b/Packages/Matrix_search/include/CGAL/Extremal_polygon_traits_2.h @@ -27,9 +27,7 @@ #if ! (CGAL_EXTREMAL_POLYGON_TRAITS_2_H) #define CGAL_EXTREMAL_POLYGON_TRAITS_2_H 1 -#ifndef CGAL_OPTIMISATION_ASSERTIONS_H #include -#endif // CGAL_OPTIMISATION_ASSERTIONS_H #ifndef CGAL_SQUARED_DISTANCE_2_H #include #endif // CGAL_SQUARED_DISTANCE_2_H @@ -190,9 +188,7 @@ public: }; -#ifndef CGAL_OPTIMISATION_ASSERTIONS_H #include -#endif // CGAL_OPTIMISATION_ASSERTIONS_H #ifndef CGAL_PROTECT_MATH_H #include #define CGAL_PROTECT_MATH_H diff --git a/Packages/Matrix_search/include/CGAL/Iso_square_static_2.h b/Packages/Matrix_search/include/CGAL/Iso_square_static_2.h index 4fdb857dbdf..c2a4b5d3a51 100644 --- a/Packages/Matrix_search/include/CGAL/Iso_square_static_2.h +++ b/Packages/Matrix_search/include/CGAL/Iso_square_static_2.h @@ -27,9 +27,7 @@ #if ! (CGAL_ISO_SQUARE_STATIC_2_H) #define CGAL_ISO_SQUARE_STATIC_2_H 1 -#ifndef CGAL_OPTIMISATION_ASSERTIONS_H #include -#endif // CGAL_OPTIMISATION_ASSERTIONS_H // class CGAL__Iso_square_static_2 represents a square with center and radius. // all objects have the same radius ==> radius is a static member diff --git a/Packages/Matrix_search/include/CGAL/Pierce_rectangles_2_traits.h b/Packages/Matrix_search/include/CGAL/Pierce_rectangles_2_traits.h index c2f0f504de1..e8cc7a3fac2 100644 --- a/Packages/Matrix_search/include/CGAL/Pierce_rectangles_2_traits.h +++ b/Packages/Matrix_search/include/CGAL/Pierce_rectangles_2_traits.h @@ -27,15 +27,9 @@ #if ! (CGAL_PIERCE_RECTANGLES_2_TRAITS_H) #define CGAL_PIERCE_RECTANGLES_2_TRAITS_H 1 -#ifndef CGAL_POINT_2_H #include -#endif // CGAL_POINT_2_H -#ifndef CGAL_ISO_RECTANGLE_2_H #include -#endif // CGAL_ISO_RECTANGLE_2_H -#ifndef CGAL_ISO_SQUARE_STATIC_2_H #include -#endif // CGAL_ISO_SQUARE_STATIC_2_H template < class _R > struct CGAL_Piercing_traits_cartesian { diff --git a/Packages/Matrix_search/include/CGAL/Transform_iterator.h b/Packages/Matrix_search/include/CGAL/Transform_iterator.h index 80237c0fe32..8ac86374390 100644 --- a/Packages/Matrix_search/include/CGAL/Transform_iterator.h +++ b/Packages/Matrix_search/include/CGAL/Transform_iterator.h @@ -27,9 +27,7 @@ #if ! (CGAL_TRANSFORM_ITERATOR_H) #define CGAL_TRANSFORM_ITERATOR_H 1 -#ifndef CGAL_OPTIMISATION_ASSERTIONS_H #include -#endif // CGAL_OPTIMISATION_ASSERTIONS_H #ifndef CGAL_CIRCULATOR_BASES_H #include #endif // CGAL_CIRCULATOR_BASES_H diff --git a/Packages/Matrix_search/include/CGAL/all_furthest_neighbors_2.h b/Packages/Matrix_search/include/CGAL/all_furthest_neighbors_2.h index 18e9a2a1e01..57525dc5627 100644 --- a/Packages/Matrix_search/include/CGAL/all_furthest_neighbors_2.h +++ b/Packages/Matrix_search/include/CGAL/all_furthest_neighbors_2.h @@ -27,9 +27,7 @@ #if ! (CGAL_ALL_FURTHEST_NEIGHBORS_2_H) #define CGAL_ALL_FURTHEST_NEIGHBORS_2_H 1 -#ifndef CGAL_OPTIMISATION_ASSERTIONS_H #include -#endif // CGAL_OPTIMISATION_ASSERTIONS_H #ifdef CGAL_REP_CLASS_DEFINED #ifndef CGAL_ALL_FURTHEST_NEIGHBORS_TRAITS_2_H diff --git a/Packages/Matrix_search/include/CGAL/monotone_matrix_search.h b/Packages/Matrix_search/include/CGAL/monotone_matrix_search.h index 9e64aa7319b..2773719d5b7 100644 --- a/Packages/Matrix_search/include/CGAL/monotone_matrix_search.h +++ b/Packages/Matrix_search/include/CGAL/monotone_matrix_search.h @@ -27,9 +27,7 @@ #if ! (CGAL_MONOTONE_MATRIX_SEARCH_H) #define CGAL_MONOTONE_MATRIX_SEARCH_H 1 -#ifndef CGAL_OPTIMISATION_ASSERTIONS_H #include -#endif // CGAL_OPTIMISATION_ASSERTIONS_H #ifndef CGAL_PROTECT_VECTOR_H #include #define CGAL_PROTECT_VECTOR_H diff --git a/Packages/Matrix_search/include/CGAL/pierce_rectangles_2.h b/Packages/Matrix_search/include/CGAL/pierce_rectangles_2.h index f4182d1cf1c..325c06d9e84 100644 --- a/Packages/Matrix_search/include/CGAL/pierce_rectangles_2.h +++ b/Packages/Matrix_search/include/CGAL/pierce_rectangles_2.h @@ -27,33 +27,15 @@ #if ! (CGAL_PIERCE_RECTANGLES_2_H) #define CGAL_PIERCE_RECTANGLES_2_H 1 -#ifndef CGAL_OPTIMISATION_ASSERTIONS_H #include -#endif // CGAL_OPTIMISATION_ASSERTIONS_H -#ifndef CGAL_CIRCULATOR_H #include -#endif // CGAL_CIRCULATOR_H -#ifndef CGAL_FUNCTION_OBJECTS_H #include -#endif // CGAL_FUNCTION_OBJECTS_H -#ifndef CGAL_TRANSFORM_ITERATOR_H #include -#endif // CGAL_TRANSFORM_ITERATOR_H -#ifndef CGAL_PROTECT_ALGO_H #include -#define CGAL_PROTECT_ALGO_H -#endif // CGAL_PROTECT_ALGO_H -#ifndef CGAL_PROTECT_VECTOR_H #include -#define CGAL_PROTECT_VECTOR_H -#endif // CGAL_PROTECT_VECTOR_H #ifdef CGAL_PCENTER_WINDOW_TRACE -#ifndef CGAL_IO_WINDOW_STREAM_H #include -#endif // CGAL_IO_WINDOW_STREAM_H -#ifndef CGAL_IO_OSTREAM_ITERATOR_H #include -#endif // CGAL_IO_OSTREAM_ITERATOR_H #endif // CGAL_PCENTER_WINDOW_TRACE //!!! to function_objects.h @@ -807,9 +789,7 @@ CGAL__Rectangle_partition( } // Rectangle_partition( f, l, d) #ifdef CGAL_REP_CLASS_DEFINED -#ifndef CGAL_PIERCE_RECTANGLES_2_TRAITS_H #include -#endif // CGAL_PIERCE_RECTANGLES_2_TRAITS_H #endif // CGAL_REP_CLASS_DEFINED template < class RandomAccessIC, @@ -994,6 +974,7 @@ CGAL_three_pierce_rectangles( // define container to store disjoint rectangles: // typedef vector< Iso_rectangle_2 > Rectangle_cont; typedef vector< Iso_rectangle_2 > Rectangle_cont; + typedef Rectangle_cont::size_type size_type; typedef Rectangle_cont::iterator Rectangle_iterator; Rectangle_cont disjoint; disjoint.reserve( number_of_points); @@ -1064,7 +1045,7 @@ CGAL_three_pierce_rectangles( if ( ok) { // does any rectangle contain the corner? - if ( disjoint.size() < number_of_points) + if ( disjoint.size() < CGAL_static_cast( size_type, number_of_points)) *o++ = d.vertex( k); return o; } // if ( ok) @@ -1141,6 +1122,7 @@ CGAL_four_pierce_rectangles( // define container to store disjoint rectangles: // typedef vector< Iso_rectangle_2 > Rectangle_cont; typedef vector< Iso_rectangle_2 > Rectangle_cont; + typedef Rectangle_cont::size_type size_type; typedef Rectangle_cont::iterator Rectangle_iterator; Rectangle_cont disjoint; disjoint.reserve( number_of_points); @@ -1211,7 +1193,7 @@ CGAL_four_pierce_rectangles( if ( ok) { // does any rectangle contain the corner? - if ( disjoint.size() < number_of_points) + if ( disjoint.size() < CGAL_static_cast( size_type, number_of_points)) *o++ = d.vertex( k); return o; } // if ( ok) diff --git a/Packages/Matrix_search/include/CGAL/rectangular_p_center_2.h b/Packages/Matrix_search/include/CGAL/rectangular_p_center_2.h index fbb596c19be..16f19647fa3 100644 --- a/Packages/Matrix_search/include/CGAL/rectangular_p_center_2.h +++ b/Packages/Matrix_search/include/CGAL/rectangular_p_center_2.h @@ -27,28 +27,15 @@ #if ! (CGAL_RECTANGULAR_P_CENTER_2_H) #define CGAL_RECTANGULAR_P_CENTER_2_H 1 -#ifndef CGAL_PIERCE_RECTANGLES_2_H #include -#endif // CGAL_PIERCE_RECTANGLES_2_H -#ifndef CGAL_FUNCTION_OBJECTS_H #include -#endif // CGAL_FUNCTION_OBJECTS_H -#ifndef CGAL_SORTED_MATRIX_SEARCH_H #include -#endif // CGAL_SORTED_MATRIX_SEARCH_H -#ifndef CGAL_PROTECT_ALGO_H #include -#define CGAL_PROTECT_ALGO_H -#endif // CGAL_PROTECT_ALGO_H #ifdef CGAL_REP_CLASS_DEFINED -#ifndef CGAL_RECTANGULAR_P_CENTER_2_TRAITS_H #include -#endif // CGAL_RECTANGULAR_P_CENTER_2_TRAITS_H #endif // CGAL_REP_CLASS_DEFINED -#ifndef CGAL_CARTESIAN_MATRIX_H #include -#endif // CGAL_CARTESIAN_MATRIX_H template < class Operation, class RandomAccessIC_row, diff --git a/Packages/Matrix_search/include/CGAL/rectangular_p_center_2_traits.h b/Packages/Matrix_search/include/CGAL/rectangular_p_center_2_traits.h index 8f5c07adc7a..ddaaf35b464 100644 --- a/Packages/Matrix_search/include/CGAL/rectangular_p_center_2_traits.h +++ b/Packages/Matrix_search/include/CGAL/rectangular_p_center_2_traits.h @@ -27,16 +27,9 @@ #if ! (CGAL_RECTANGULAR_P_CENTER_2_TRAITS_H) #define CGAL_RECTANGULAR_P_CENTER_2_TRAITS_H 1 -#ifndef CGAL_OPTIMISATION_ASSERTIONS_H #include -#endif // CGAL_OPTIMISATION_ASSERTIONS_H -#ifndef CGAL_ISO_RECTANGLE_2_H #include -#endif // CGAL_ISO_RECTANGLE_2_H -#ifndef CGAL_PROTECT_VECTOR_H #include -#define CGAL_PROTECT_VECTOR_H -#endif // CGAL_PROTECT_VECTOR_H #if !defined(CGAL_CFG_NO_ITERATOR_TRAITS) && \ !defined(CGAL_CFG_MATCHING_BUG_2)