Skip to content

Commit

Permalink
Avoid sus::cast in float literals
Browse files Browse the repository at this point in the history
  • Loading branch information
danakj committed Dec 20, 2023
1 parent 7930a3f commit 5493c7e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sus/num/__private/literals.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#if _MSC_VER
# include "sus/assertions/check.h"
# include "sus/num/cast.h"
#endif

#if _MSC_VER && !defined(__clang__)
Expand Down Expand Up @@ -70,7 +69,7 @@
return T(static_cast<decltype(T::primitive_value)>(val)); \
} \
T inline constexpr operator""_##Name(unsigned long long val) noexcept { \
return T(::sus::cast<decltype(T::primitive_value)>(val)); \
return T(static_cast<decltype(T::primitive_value)>(val)); \
}

#else
Expand All @@ -82,6 +81,6 @@
return T(static_cast<decltype(T::primitive_value)>(val)); \
} \
T inline consteval operator""_##Name(unsigned long long val) { \
return T(::sus::cast<decltype(T::primitive_value)>(val)); \
return T(static_cast<decltype(T::primitive_value)>(val)); \
}
#endif

0 comments on commit 5493c7e

Please sign in to comment.