mirror of https://github.com/CGAL/cgal
fixed warnings from the test suite
This commit is contained in:
parent
31c2fe0da8
commit
d03c669cd3
|
|
@ -224,8 +224,7 @@ namespace Barycentric_coordinates {
|
||||||
const Point_2& vertex(
|
const Point_2& vertex(
|
||||||
const std::size_t query_index) const {
|
const std::size_t query_index) const {
|
||||||
|
|
||||||
CGAL_precondition(
|
CGAL_precondition(query_index < number_of_vertices());
|
||||||
query_index >= 0 && query_index < number_of_vertices());
|
|
||||||
return m_vhs[query_index]->point();
|
return m_vhs[query_index]->point();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -243,8 +242,7 @@ namespace Barycentric_coordinates {
|
||||||
bool is_on_boundary(
|
bool is_on_boundary(
|
||||||
const std::size_t query_index) const {
|
const std::size_t query_index) const {
|
||||||
|
|
||||||
CGAL_precondition(
|
CGAL_precondition(query_index < number_of_vertices());
|
||||||
query_index >= 0 && query_index < number_of_vertices());
|
|
||||||
return m_vhs[query_index]->info().is_on_boundary;
|
return m_vhs[query_index]->info().is_on_boundary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -267,8 +265,7 @@ namespace Barycentric_coordinates {
|
||||||
const std::size_t query_index,
|
const std::size_t query_index,
|
||||||
std::vector<std::size_t>& neighbors) const {
|
std::vector<std::size_t>& neighbors) const {
|
||||||
|
|
||||||
CGAL_precondition(
|
CGAL_precondition(query_index < number_of_vertices());
|
||||||
query_index >= 0 && query_index < number_of_vertices());
|
|
||||||
const auto vh = m_vhs[query_index];
|
const auto vh = m_vhs[query_index];
|
||||||
neighbors = vh->info().neighbors;
|
neighbors = vh->info().neighbors;
|
||||||
}
|
}
|
||||||
|
|
@ -294,7 +291,7 @@ namespace Barycentric_coordinates {
|
||||||
triangle.clear();
|
triangle.clear();
|
||||||
const auto fh = m_cdt.locate(query);
|
const auto fh = m_cdt.locate(query);
|
||||||
if (fh->is_in_domain()) {
|
if (fh->is_in_domain()) {
|
||||||
for (std::size_t i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
triangle.push_back(fh->vertex(i)->info().index);
|
triangle.push_back(fh->vertex(i)->info().index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -213,9 +213,9 @@ namespace Barycentric_coordinates {
|
||||||
const std::size_t i1 = m_element[1];
|
const std::size_t i1 = m_element[1];
|
||||||
const std::size_t i2 = m_element[2];
|
const std::size_t i2 = m_element[2];
|
||||||
|
|
||||||
CGAL_assertion(i0 >= 0 && i0 < m_domain.number_of_vertices());
|
CGAL_assertion(i0 < m_domain.number_of_vertices());
|
||||||
CGAL_assertion(i1 >= 0 && i1 < m_domain.number_of_vertices());
|
CGAL_assertion(i1 < m_domain.number_of_vertices());
|
||||||
CGAL_assertion(i2 >= 0 && i2 < m_domain.number_of_vertices());
|
CGAL_assertion(i2 < m_domain.number_of_vertices());
|
||||||
|
|
||||||
const auto& p0 = m_domain.vertex(i0);
|
const auto& p0 = m_domain.vertex(i0);
|
||||||
const auto& p1 = m_domain.vertex(i1);
|
const auto& p1 = m_domain.vertex(i1);
|
||||||
|
|
@ -276,7 +276,7 @@ namespace Barycentric_coordinates {
|
||||||
\return an output iterator to the element in the destination range,
|
\return an output iterator to the element in the destination range,
|
||||||
one past the last coordinate stored
|
one past the last coordinate stored
|
||||||
|
|
||||||
\pre query >= 0 && query < domain.number_of_vertices()
|
\pre query_index >= 0 && query_index < domain.number_of_vertices()
|
||||||
*/
|
*/
|
||||||
template<typename OutIterator>
|
template<typename OutIterator>
|
||||||
OutIterator operator()(
|
OutIterator operator()(
|
||||||
|
|
@ -292,7 +292,7 @@ namespace Barycentric_coordinates {
|
||||||
m_solve_is_called)) return c_begin;
|
m_solve_is_called)) return c_begin;
|
||||||
|
|
||||||
CGAL_precondition(
|
CGAL_precondition(
|
||||||
query_index >= 0 && query_index < m_domain.number_of_vertices());
|
query_index < m_domain.number_of_vertices());
|
||||||
CGAL_assertion(m_boundary.size() > 0);
|
CGAL_assertion(m_boundary.size() > 0);
|
||||||
CGAL_assertion(m_interior.size() > 0);
|
CGAL_assertion(m_interior.size() > 0);
|
||||||
|
|
||||||
|
|
@ -597,11 +597,11 @@ namespace Barycentric_coordinates {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
triplet_list.push_back(
|
triplet_list.push_back(
|
||||||
TripletFT(indices[i], indices[idx], w));
|
TripletFT(int(indices[i]), int(indices[idx]), w));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
triplet_list.push_back(
|
triplet_list.push_back(
|
||||||
TripletFT(indices[i], indices[i], W));
|
TripletFT(int(indices[i]), int(indices[i]), W));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -364,7 +364,7 @@ namespace internal {
|
||||||
switch (location) {
|
switch (location) {
|
||||||
|
|
||||||
case Query_point_location::ON_VERTEX: {
|
case Query_point_location::ON_VERTEX: {
|
||||||
CGAL_assertion(index >= 0 && index < n);
|
CGAL_assertion(index < n);
|
||||||
|
|
||||||
for (std::size_t i = 0; i < n; ++i)
|
for (std::size_t i = 0; i < n; ++i)
|
||||||
if (i == index) {
|
if (i == index) {
|
||||||
|
|
@ -376,7 +376,7 @@ namespace internal {
|
||||||
}
|
}
|
||||||
|
|
||||||
case Query_point_location::ON_EDGE: {
|
case Query_point_location::ON_EDGE: {
|
||||||
CGAL_assertion(index >= 0 && index < n);
|
CGAL_assertion(index < n);
|
||||||
|
|
||||||
if (index == n - 1) {
|
if (index == n - 1) {
|
||||||
return coordinates_on_last_edge_2(
|
return coordinates_on_last_edge_2(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue