mirror of https://github.com/CGAL/cgal
Merge pull request #9049 from soesau/CGAL-warnings-GF
Fixing warnings (mostly unused variables)
This commit is contained in:
commit
947c9d0370
|
|
@ -46,6 +46,9 @@ if (NOT MPFR_in_cache)
|
||||||
if ( NOT MPFR_INCLUDE_DIR OR NOT MPFR_LIBRARIES_DIR )
|
if ( NOT MPFR_INCLUDE_DIR OR NOT MPFR_LIBRARIES_DIR )
|
||||||
include( MPFRConfig OPTIONAL )
|
include( MPFRConfig OPTIONAL )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(MPFR_DEPENDENCY_INCLUDE_DIR ${GMP_INCLUDE_DIR})
|
||||||
|
set(MPFR_DEPENDENCY_LIBRARIES ${GMP_LIBRARIES})
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -363,11 +363,6 @@ public:
|
||||||
if (m_intersection_graph.iedge_is_on_bbox(edge))
|
if (m_intersection_graph.iedge_is_on_bbox(edge))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Count faces
|
|
||||||
std::size_t numfaces = 0;
|
|
||||||
for (std::size_t i = 0; i < m_support_planes.size(); i++)
|
|
||||||
numfaces += m_support_planes[i].data().mesh.number_of_faces();
|
|
||||||
|
|
||||||
Support_plane& sp = m_support_planes[sp_idx];
|
Support_plane& sp = m_support_planes[sp_idx];
|
||||||
|
|
||||||
To_exact to_exact;
|
To_exact to_exact;
|
||||||
|
|
@ -550,11 +545,6 @@ public:
|
||||||
|
|
||||||
template<typename Queue>
|
template<typename Queue>
|
||||||
void fill_event_queue(Queue& queue) {
|
void fill_event_queue(Queue& queue) {
|
||||||
// Count faces
|
|
||||||
std::size_t faces = 0;
|
|
||||||
for (std::size_t i = 0; i < m_support_planes.size(); i++)
|
|
||||||
faces += m_support_planes[i].data().mesh.number_of_faces();
|
|
||||||
|
|
||||||
for (std::size_t sp_idx = 6; sp_idx < m_support_planes.size(); sp_idx++) {
|
for (std::size_t sp_idx = 6; sp_idx < m_support_planes.size(); sp_idx++) {
|
||||||
std::vector<IEdge> border;
|
std::vector<IEdge> border;
|
||||||
m_support_planes[sp_idx].get_border(m_intersection_graph, border);
|
m_support_planes[sp_idx].get_border(m_intersection_graph, border);
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@ using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel;
|
||||||
using EPECK = CGAL::Exact_predicates_exact_constructions_kernel;
|
using EPECK = CGAL::Exact_predicates_exact_constructions_kernel;
|
||||||
|
|
||||||
std::size_t different = 0;
|
std::size_t different = 0;
|
||||||
|
std::size_t no_input = 0;
|
||||||
|
std::size_t failed = 0;
|
||||||
|
std::size_t passed = 0;
|
||||||
|
|
||||||
template<typename Kernel, typename IntersectionKernel>
|
template<typename Kernel, typename IntersectionKernel>
|
||||||
bool run_test(
|
bool run_test(
|
||||||
|
|
@ -33,7 +36,7 @@ bool run_test(
|
||||||
input_file_ply.close();
|
input_file_ply.close();
|
||||||
else {
|
else {
|
||||||
std::cerr << "ERROR: can't read the OFF/PLY file " << filename << "!" << std::endl;
|
std::cerr << "ERROR: can't read the OFF/PLY file " << filename << "!" << std::endl;
|
||||||
different++;
|
no_input++;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -56,7 +59,9 @@ bool run_test(
|
||||||
|
|
||||||
std::cout << ksp.number_of_volumes() << std::endl;
|
std::cout << ksp.number_of_volumes() << std::endl;
|
||||||
|
|
||||||
if (results[i][0] != count[0] || results[i][1] != count[2] || results[i][2] != count[3]) {
|
if (ksp.number_of_volumes() == 0)
|
||||||
|
failed++;
|
||||||
|
else if (results[i][0] != count[0] || results[i][1] != count[2] || results[i][2] != count[3]) {
|
||||||
std::cout << "TEST differs: Partitioning has not expected number of vertices, faces or volumes for k = " << ks[i] << std::endl;
|
std::cout << "TEST differs: Partitioning has not expected number of vertices, faces or volumes for k = " << ks[i] << std::endl;
|
||||||
|
|
||||||
std::cout << "Expectation:" << std::endl;
|
std::cout << "Expectation:" << std::endl;
|
||||||
|
|
@ -66,7 +71,10 @@ bool run_test(
|
||||||
|
|
||||||
different++;
|
different++;
|
||||||
}
|
}
|
||||||
else std::cout << "TEST PASSED k = " << ks[i] << " " << input_filename << std::endl;
|
else {
|
||||||
|
passed++;
|
||||||
|
std::cout << "TEST PASSED k = " << ks[i] << " " << input_filename << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -277,11 +285,25 @@ void run_all_tests() {
|
||||||
results[2] = { 1395, 3115, 882 };
|
results[2] = { 1395, 3115, 882 };
|
||||||
run_test<Kernel, IntersectionKernel>("data/real-data-test/test-40-polygons.ply", { 1, 2, 3 }, results);
|
run_test<Kernel, IntersectionKernel>("data/real-data-test/test-40-polygons.ply", { 1, 2, 3 }, results);
|
||||||
|
|
||||||
|
std::cout << "\n";
|
||||||
|
|
||||||
const auto kernel_name = boost::typeindex::type_id<Kernel>().pretty_name();
|
const auto kernel_name = boost::typeindex::type_id<Kernel>().pretty_name();
|
||||||
if (different != 0) {
|
if (no_input != 0) {
|
||||||
std::cout << std::endl << kernel_name << " " << different << " TESTS differ from typical values!" << std::endl << std::endl;
|
std::cout << kernel_name << " " << no_input << " TESTS failed due to missing input files!\n";
|
||||||
}
|
}
|
||||||
std::cout << std::endl << kernel_name << " TESTS SUCCESS!" << std::endl << std::endl;
|
|
||||||
|
if (failed != 0) {
|
||||||
|
std::cout << kernel_name << " " << failed << " TESTS failed! The space partition was empty!\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (different != 0) {
|
||||||
|
std::cout << kernel_name << " " << different << " TESTS differ from typical values!\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (passed != 0)
|
||||||
|
std::cout << kernel_name << " " << passed << " TESTS passed!\n";
|
||||||
|
|
||||||
|
std::cout << "\n" << kernel_name << " TESTS FINISHED!" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(const int /* argc */, const char** /* argv */) {
|
int main(const int /* argc */, const char** /* argv */) {
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,13 @@ namespace LAS {
|
||||||
inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::Withheld_flag&)
|
inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::Withheld_flag&)
|
||||||
{ r.set_withheld_flag(v); }
|
{ r.set_withheld_flag(v); }
|
||||||
inline void output_value(LASpoint& r, const float& v, const LAS_property::Scan_angle&)
|
inline void output_value(LASpoint& r, const float& v, const LAS_property::Scan_angle&)
|
||||||
{ r.set_scan_angle_rank(char(v)); }
|
{
|
||||||
|
#if LAS_TOOLS_VERSION < 250517
|
||||||
|
r.set_scan_angle_rank(I8_QUANTIZE(v));
|
||||||
|
#else
|
||||||
|
r.set_scan_angle(v);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::User_data&)
|
inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::User_data&)
|
||||||
{ r.set_user_data(v); }
|
{ r.set_user_data(v); }
|
||||||
inline void output_value(LASpoint& r, const unsigned short& v, const LAS_property::Point_source_ID&)
|
inline void output_value(LASpoint& r, const unsigned short& v, const LAS_property::Point_source_ID&)
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,7 @@ public:
|
||||||
int n=0;
|
int n=0;
|
||||||
Constraint_iterator cit = pct.constraints_begin(), e = pct.constraints_end();
|
Constraint_iterator cit = pct.constraints_begin(), e = pct.constraints_end();
|
||||||
for(; cit!=e; ++cit){
|
for(; cit!=e; ++cit){
|
||||||
n+= initialize_costs(*cit);
|
n+=initialize_costs(*cit);
|
||||||
}
|
}
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,6 @@ class Segment_Delaunay_graph_face_tester_2
|
||||||
Edge_circulator ec = ec_start;
|
Edge_circulator ec = ec_start;
|
||||||
size_type deg = 0; // vertex degree
|
size_type deg = 0; // vertex degree
|
||||||
size_type n_degen = 0; // number of degenerate/non-infinite edges
|
size_type n_degen = 0; // number of degenerate/non-infinite edges
|
||||||
size_type n_inf = 0; // number of infinite edges
|
|
||||||
// number of non-degenerate/non-infinite edges
|
// number of non-degenerate/non-infinite edges
|
||||||
size_type n_non_degen = 0;
|
size_type n_non_degen = 0;
|
||||||
|
|
||||||
|
|
@ -195,8 +194,7 @@ class Segment_Delaunay_graph_face_tester_2
|
||||||
Edge_tester e_tester;
|
Edge_tester e_tester;
|
||||||
do {
|
do {
|
||||||
if ( e_tester(dual, ec) ) { ++n_degen; }
|
if ( e_tester(dual, ec) ) { ++n_degen; }
|
||||||
else if ( dual.is_infinite(ec) ) { ++n_inf; }
|
else if ( !dual.is_infinite(ec) ) {
|
||||||
else {
|
|
||||||
if ( !dual.is_infinite(ec) ) {
|
if ( !dual.is_infinite(ec) ) {
|
||||||
if ( n_non_degen < 2 ) {
|
if ( n_non_degen < 2 ) {
|
||||||
e[n_non_degen] = *ec;
|
e[n_non_degen] = *ec;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue