Fixed warnings

This commit is contained in:
DarthAffe committed 2021-02-02 23:37:56 +01:00
1 parent 57dc9afb32
commit a0a1521658
118 files changed
+802 -1181

No files matched your search

@@ -26,7 +26,7 @@ namespace RGB.NET.Devices.CoolerMaster
/// Gets or sets the update queue performing updates for this device.
/// </summary>
// ReSharper disable once MemberCanBePrivate.Global
protected CoolerMasterUpdateQueue UpdateQueue { get; set; }
protected CoolerMasterUpdateQueue? UpdateQueue { get; set; }
#endregion
@@ -55,7 +55,7 @@ namespace RGB.NET.Devices.CoolerMaster
if (Size == Size.Invalid)
{
Rectangle ledRectangle = new Rectangle(this.Select(x => x.LedRectangle));
Rectangle ledRectangle = new(this.Select(x => x.LedRectangle));
Size = ledRectangle.Size + new Size(ledRectangle.Location.X, ledRectangle.Location.Y);
}
@@ -68,7 +68,7 @@ namespace RGB.NET.Devices.CoolerMaster
protected abstract void InitializeLayout();
/// <inheritdoc />
protected override void UpdateLeds(IEnumerable<Led> ledsToUpdate) => UpdateQueue.SetData(ledsToUpdate.Where(x => x.Color.A > 0));
protected override void UpdateLeds(IEnumerable<Led> ledsToUpdate) => UpdateQueue?.SetData(ledsToUpdate.Where(x => x.Color.A > 0));
/// <inheritdoc cref="IDisposable.Dispose" />
/// <inheritdoc cref="AbstractRGBDevice{TDeviceInfo}.Dispose" />
@@ -1,5 +1,4 @@
using System;
using RGB.NET.Core;
using RGB.NET.Core;
using RGB.NET.Devices.CoolerMaster.Helper;
namespace RGB.NET.Devices.CoolerMaster
@@ -45,7 +44,7 @@ namespace RGB.NET.Devices.CoolerMaster
this.DeviceType = deviceType;
this.DeviceIndex = deviceIndex;
Model = deviceIndex.GetDescription();
Model = deviceIndex.GetDescription() ?? "Unknown";
DeviceName = $"{Manufacturer} {Model}";
}