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

@@ -14,8 +14,8 @@ namespace RGB.NET.Devices.Logitech
#region Properties & Fields
internal static Dictionary<LedId, int> BitmapOffset { get; } = new Dictionary<LedId, int>
{
internal static Dictionary<LedId, int> BitmapOffset { get; } = new()
{
{ LedId.Keyboard_Escape, 0 },
{ LedId.Keyboard_F1, 4 },
{ LedId.Keyboard_F2, 8 },
@@ -29,7 +29,7 @@ namespace RGB.NET.Devices.Logitech
protected override object? GetLedCustomData(LedId ledId) => (ledId, PerKeyIdMapping.DEFAULT.TryGetValue(ledId, out LogitechLedId logitechLedId) ? logitechLedId : LogitechLedId.Invalid);
/// <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));
#endregion
}
@@ -5,8 +5,8 @@ namespace RGB.NET.Devices.Logitech
{
internal static class PerKeyIdMapping
{
internal static readonly Dictionary<LedId, LogitechLedId> DEFAULT = new Dictionary<LedId, LogitechLedId>
{
internal static readonly Dictionary<LedId, LogitechLedId> DEFAULT = new()
{
{ LedId.Invalid, LogitechLedId.Invalid },
{ LedId.Keyboard_Escape, LogitechLedId.ESC },
{ LedId.Keyboard_F1, LogitechLedId.F1 },