mirror of
https://github.com/Ed94/gencpp.git
synced 2024-12-22 07:44:45 -08:00
Fixed swap fn
This commit is contained in:
parent
a37c3f63c2
commit
b1de5b1ac7
@ -146,7 +146,7 @@ namespace gen {
|
||||
|
||||
// Bits
|
||||
|
||||
#define bit( Value ) ( 1 << Value )
|
||||
#define bit( Value ) ( 1 << (Value) )
|
||||
#define bitfield_is_equal( Type, Field, Mask ) ( (Type(Mask) & Type(Field)) == Type(Mask) )
|
||||
|
||||
// Casting
|
||||
@ -230,7 +230,7 @@ while(0);
|
||||
#define size_of( x ) ( sw )( sizeof( x ) )
|
||||
|
||||
template< class Type >
|
||||
void swap( Type a, Type b )
|
||||
void swap( Type& a, Type& b )
|
||||
{
|
||||
Type tmp = a;
|
||||
a = b;
|
||||
|
Loading…
Reference in New Issue
Block a user