Remove need for Unqual in EndianSwapper

This commit is contained in:
Per Nordlöw 2021-08-31 12:11:48 +02:00 committed by The Dlang Bot
parent c799010b64
commit f027cbe61e

View file

@ -2948,12 +2948,12 @@ if (isIntegral!T || isSomeChar!T || isBoolean!T)
private union EndianSwapper(T) private union EndianSwapper(T)
if (canSwapEndianness!T) if (canSwapEndianness!T)
{ {
Unqual!T value; T value;
ubyte[T.sizeof] array; ubyte[T.sizeof] array;
static if (is(FloatingPointTypeOf!(Unqual!T) == float)) static if (is(immutable FloatingPointTypeOf!(T) == immutable float))
uint intValue; uint intValue;
else static if (is(FloatingPointTypeOf!(Unqual!T) == double)) else static if (is(immutable FloatingPointTypeOf!(T) == immutable double))
ulong intValue; ulong intValue;
} }