File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ namespace Utility::Endian
5454 }
5555
5656 // For enums
57- template <typename T, typename TBase = std:: underlying_type_t <T> > requires CanByteswap<T> && std::is_enum_v<T>
57+ template <typename T> requires CanByteswap<T> && std::is_enum_v<T>
5858 constexpr T toPlatform (const Type& src, const T& value) {
59- if (src != target) return static_cast <T>(byteswap (static_cast <TBase >(value)));
59+ if (src != target) return static_cast <T>(byteswap (static_cast <std:: underlying_type_t <T> >(value)));
6060 return value;
6161 }
6262
@@ -67,8 +67,8 @@ namespace Utility::Endian
6767 }
6868
6969 // For enums
70- template <typename T, typename TBase = std:: underlying_type_t <T> > requires CanByteswap<T> && std::is_enum_v<T>
70+ template <typename T> requires CanByteswap<T> && std::is_enum_v<T>
7171 constexpr void toPlatform_inplace (const Type& src, T& value) {
72- if (src != target) value = static_cast <T>(byteswap (static_cast <TBase >(value)));
72+ if (src != target) value = static_cast <T>(byteswap (static_cast <std:: underlying_type_t <T> >(value)));
7373 }
7474}
You can’t perform that action at this time.
0 commit comments