Fixed compiler warnings

pull/119/head
dahall 2020-02-09 11:27:14 -07:00
parent df6b0cb875
commit 54ee24eb96
2 changed files with 8 additions and 5 deletions

View File

@ -101,7 +101,7 @@ namespace Vanara.PInvoke
/// <para>The number of entries in the array depends on the values of the biBitCount and biClrUsed members of the BITMAPINFOHEADER structure.</para>
/// <para>The colors in the bmiColors table appear in order of importance. For more information, see the Remarks section.</para>
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.Struct)]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
public RGBQUAD[] bmiColors;
/// <summary>Initializes a new instance of the <see cref="BITMAPINFO"/> structure.</summary>
@ -307,7 +307,9 @@ namespace Vanara.PInvoke
/// Specifies three color masks for the DIB. This field is only valid when the BitCount member of the BITMAPINFOHEADER structure has a value greater
/// than 8. Each color mask indicates the bits that are used to encode one of the three color channels (red, green, and blue).
/// </summary>
#pragma warning disable IDE1006 // Naming Styles
public uint[] dsBitFields
#pragma warning restore IDE1006 // Naming Styles
{
get => new[] { dsBitField1, dsBitField2, dsBitField3 };
set { dsBitField1 = value[0]; dsBitField2 = value[1]; dsBitField3 = value[2]; }

View File

@ -4294,7 +4294,7 @@ namespace Vanara.PInvoke
internal class Marshaler : ICustomMarshaler
{
public static ICustomMarshaler GetInstance(string cookie) => new Marshaler();
public static ICustomMarshaler GetInstance(string _) => new Marshaler();
public void CleanUpManagedData(object ManagedObj)
{
@ -4406,7 +4406,7 @@ namespace Vanara.PInvoke
{
long nAuthority = 0;
for (var i = 0; i <= 5; i++)
nAuthority |= (Value[i] << (8 * i));
nAuthority |= (long)Value[i] << (8 * i);
return nAuthority;
}
set
@ -4441,6 +4441,9 @@ namespace Vanara.PInvoke
/// <inheritdoc/>
public override bool Equals(object obj) => obj is PSID_IDENTIFIER_AUTHORITY h ? h.LongValue == h.LongValue : false;
/// <inheritdoc/>
public override int GetHashCode() => LongValue.GetHashCode();
}
/// <summary>A SafeHandle for access control lists. If owned, will call LocalFree on the pointer when disposed.</summary>
@ -4450,8 +4453,6 @@ namespace Vanara.PInvoke
/// <summary>The null value for a SafePACL.</summary>
public static readonly SafePACL Null = new SafePACL();
private const SECURITY_INFORMATION defSecInfo = SECURITY_INFORMATION.DACL_SECURITY_INFORMATION | SECURITY_INFORMATION.SACL_SECURITY_INFORMATION | SECURITY_INFORMATION.OWNER_SECURITY_INFORMATION | SECURITY_INFORMATION.GROUP_SECURITY_INFORMATION;
/// <summary>Initializes a new instance of the <see cref="SafePACL"/> class.</summary>
public SafePACL() : base(IntPtr.Zero, 0, true) { }