//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// CommonHelpers satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;

#if !WASM
namespace CommonHelpers {
#else
namespace CommonHelpers.WASM {
#endif

//**************************************************************************************************
/// <summary>
/// </summary>
partial class HFlags {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public static int Clear(ref int location,int flagsToClear)
{
   return location &= ~flagsToClear;
}

public static long Clear(ref long location,long flagsToClear)
{
   return location &= ~flagsToClear;
}

public static short Clear(ref short location,short flagsToClear)
{
   return location &= unchecked( (short)~flagsToClear );
}

public static byte Clear(ref byte location,byte flagsToClear)
{
   return location &= unchecked( (byte)~flagsToClear );
}

//--------------------------------------------------------------------------------------------------

[CLSCompliant(false)]
public static uint Clear(ref uint location,uint flagsToClear)
{
   return location &= ~flagsToClear;
}

[CLSCompliant(false)]
public static ulong Clear(ref ulong location,ulong flagsToClear)
{
   return location &= ~flagsToClear;
}

[CLSCompliant(false)]
public static ushort Clear(ref ushort location,ushort flagsToClear)
{
   return location &= unchecked( (ushort)~flagsToClear );
}

[CLSCompliant(false)]
public static sbyte Clear(ref sbyte location,sbyte flagsToClear)
{
   return location &= unchecked( (sbyte)~flagsToClear );
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HFlags
//**************************************************************************************************

} // CommonHelpers (.WASM)
