Fixed swap fn

This commit is contained in:
Edward R. Gonzalez 2023-07-21 01:40:45 -04:00
parent a37c3f63c2
commit b1de5b1ac7

View File

@ -146,7 +146,7 @@ namespace gen {
// Bits // Bits
#define bit( Value ) ( 1 << Value ) #define bit( Value ) ( 1 << (Value) )
#define bitfield_is_equal( Type, Field, Mask ) ( (Type(Mask) & Type(Field)) == Type(Mask) ) #define bitfield_is_equal( Type, Field, Mask ) ( (Type(Mask) & Type(Field)) == Type(Mask) )
// Casting // Casting
@ -230,7 +230,7 @@ while(0);
#define size_of( x ) ( sw )( sizeof( x ) ) #define size_of( x ) ( sw )( sizeof( x ) )
template< class Type > template< class Type >
void swap( Type a, Type b ) void swap( Type& a, Type& b )
{ {
Type tmp = a; Type tmp = a;
a = b; a = b;