Support Clang's -Wconversion -Wfloat-conversion -Wsign-conversion with -Werror

This commit is contained in:
Ion Gaztañaga
2021-10-20 00:16:34 +02:00
parent 82dfdf8e78
commit 55bbf331b0
14 changed files with 57 additions and 60 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ bool measure_algo(T *elements, std::size_t element_count, std::size_t split_pos,
nanosecond_type new_clock = timer.elapsed().wall;
//std::cout << "Cmp:" << order_perf_type::num_compare << " Cpy:" << order_perf_type::num_copy; //for old compilers without ll size argument
std::printf("Cmp:%8.04f Cpy:%9.04f", double(order_perf_type::num_compare)/element_count, double(order_perf_type::num_copy)/element_count );
std::printf("Cmp:%8.04f Cpy:%9.04f", double(order_perf_type::num_compare)/double(element_count), double(order_perf_type::num_copy)/double(element_count) );
double time = double(new_clock);
+1 -1
View File
@@ -206,7 +206,7 @@ bool measure_algo(T *elements, std::size_t element_count, std::size_t alg, nanos
nanosecond_type new_clock = timer.elapsed().wall;
//std::cout << "Cmp:" << order_perf_type::num_compare << " Cpy:" << order_perf_type::num_copy; //for old compilers without ll size argument
std::printf("Cmp:%7.03f Cpy:%8.03f", double(order_perf_type::num_compare)/element_count, double(order_perf_type::num_copy)/element_count );
std::printf("Cmp:%7.03f Cpy:%8.03f", double(order_perf_type::num_compare)/double(element_count), double(order_perf_type::num_copy)/double(element_count) );
double time = double(new_clock);
+2 -1
View File
@@ -15,6 +15,7 @@
#include <boost/move/core.hpp>
#include <boost/move/detail/unique_ptr_meta_utils.hpp>
#include <boost/static_assert.hpp>
#include <cstddef>
//////////////////////////////////////////////
//
@@ -188,7 +189,7 @@ BOOST_STATIC_ASSERT((::boost::move_upmu::is_convertible<B, A>::value));
struct I;
void check(int i);
I* get();
I* get_array(int i);
I* get_array(std::size_t i);
#include <boost/move/unique_ptr.hpp>
+1 -1
View File
@@ -30,7 +30,7 @@ struct I
int I::count = 0;
I* get() {return new I;}
I* get_array(int i) {return new I[i];}
I* get_array(std::size_t i) {return new I[i];}
void check(int i)
{