From 33549c2e0280e0d2894140e16d5e983f2711ce12 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 28 Feb 2013 08:42:22 +0100 Subject: [PATCH] static_cast --- Matrix_search/include/CGAL/sorted_matrix_search.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Matrix_search/include/CGAL/sorted_matrix_search.h b/Matrix_search/include/CGAL/sorted_matrix_search.h index 78f12a93b7a..5a752725911 100644 --- a/Matrix_search/include/CGAL/sorted_matrix_search.h +++ b/Matrix_search/include/CGAL/sorted_matrix_search.h @@ -208,7 +208,7 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) // (should typically result in a segfault) // active_cells.reserve( 4 * active_cells.size()); - for ( int j = active_cells.size() - 1 ; j >= 0 ; -- j ) + for ( int j = static_cast(active_cells.size()) - 1 ; j >= 0 ; -- j ) { //for ( Cell_reverse_iterator j( active_cells.rbegin()); // j != active_cells.rend(); @@ -252,8 +252,8 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) // compute medians of smallest and largest elements: - int lower_median_rank = (active_cells.size() - 1) >> 1; - int upper_median_rank = (active_cells.size() >> 1); + int lower_median_rank = static_cast((active_cells.size() - 1) >> 1); + int upper_median_rank = static_cast(active_cells.size() >> 1); // compute upper median of cell's minima: