Skip to content

Commit 374221e

Browse files
authored
Explicitly static cast to long double (#267)
This fixes a very verbose warning that I noticed when installing the library in a Visual Studio project on Windows. And it just seems like a clearly good change for its own sake, anyway.
1 parent e23614c commit 374221e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

au/code/au/magnitude.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ constexpr MagRepresentationOrError<T> root(T x, std::uintmax_t n) {
378378
// Always use `long double` for intermediate computations. We don't ever expect people to be
379379
// calling this at runtime, so we want maximum accuracy.
380380
long double lo = 1.0;
381-
long double hi = x;
381+
long double hi = static_cast<long double>(x);
382382

383383
// Do a binary search to find the closest value such that `checked_int_pow` recovers the input.
384384
//

0 commit comments

Comments
 (0)