File tree 3 files changed +6
-6
lines changed 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ namespace Catch {
178
178
double diff = b - m;
179
179
return a + diff * diff;
180
180
} ) /
181
- ( last - first );
181
+ static_cast < double > ( last - first );
182
182
return std::sqrt ( variance );
183
183
}
184
184
@@ -213,7 +213,7 @@ namespace Catch {
213
213
double * first,
214
214
double * last ) {
215
215
auto count = last - first;
216
- double idx = ( count - 1 ) * k / static_cast <double >(q);
216
+ double idx = static_cast < double >(( count - 1 ) * k) / static_cast <double >(q);
217
217
int j = static_cast <int >(idx);
218
218
double g = idx - j;
219
219
std::nth_element (first, first + j, last);
@@ -316,10 +316,10 @@ namespace Catch {
316
316
317
317
double accel = sum_cubes / ( 6 * std::pow ( sum_squares, 1.5 ) );
318
318
long n = static_cast <long >( resample.size () );
319
- double prob_n =
319
+ double prob_n = static_cast < double >(
320
320
std::count_if ( resample.begin (),
321
321
resample.end (),
322
- [point]( double x ) { return x < point; } ) /
322
+ [point]( double x ) { return x < point; } )) /
323
323
static_cast <double >( n );
324
324
// degenerate case with uniform samples
325
325
if ( Catch::Detail::directCompare ( prob_n, 0 . ) ) {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ namespace Catch {
30
30
return static_cast <unsigned int >(getElapsedMicroseconds ()/1000 );
31
31
}
32
32
auto Timer::getElapsedSeconds () const -> double {
33
- return getElapsedMicroseconds ()/1000000.0 ;
33
+ return static_cast < double >( getElapsedMicroseconds () )/1000000.0 ;
34
34
}
35
35
36
36
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ namespace {
52
52
SimplePcg32::result_type SimplePcg32::operator ()() {
53
53
// prepare the output value
54
54
const uint32_t xorshifted = static_cast <uint32_t >(((m_state >> 18u ) ^ m_state) >> 27u );
55
- const auto output = rotate_right (xorshifted, m_state >> 59u );
55
+ const auto output = rotate_right (xorshifted, static_cast < uint32_t >( m_state >> 59u ) );
56
56
57
57
// advance state
58
58
m_state = m_state * 6364136223846793005ULL + s_inc;
You can’t perform that action at this time.
0 commit comments