mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
(MAJOR) Removed all in paramters as their performance impact is too hard to predict
This commit is contained in:
1 parent
6f0711564c
commit
c39849949a
38 files changed
+157
-155
No files matched your search
@@ -25,7 +25,7 @@ public sealed class LimitedColorUpdateQueue : MidiUpdateQueue
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override ShortMessage CreateMessage(object key, in Color color)
|
||||
protected override ShortMessage CreateMessage(object key, Color color)
|
||||
{
|
||||
(byte mode, byte id) = ((byte, byte))key;
|
||||
return new ShortMessage(mode, id, Convert.ToByte(ConvertColor(color)));
|
||||
@@ -37,7 +37,7 @@ public sealed class LimitedColorUpdateQueue : MidiUpdateQueue
|
||||
/// </summary>
|
||||
/// <param name="color">The <see cref="Color"/> to convert.</param>
|
||||
/// <returns>The novation-representation of the <see cref="Color"/>.</returns>
|
||||
private static int ConvertColor(in Color color)
|
||||
private static int ConvertColor(Color color)
|
||||
{
|
||||
(double hue, double _, double value) = color.GetHSV();
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public abstract class MidiUpdateQueue : UpdateQueue
|
||||
/// <param name="key">The key used to identify the LED to update.</param>
|
||||
/// <param name="color">The color to send.</param>
|
||||
/// <returns>The message created out of the data set.</returns>
|
||||
protected abstract ShortMessage? CreateMessage(object key, in Color color);
|
||||
protected abstract ShortMessage? CreateMessage(object key, Color color);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Dispose()
|
||||
|
||||
@@ -151,7 +151,7 @@ public sealed class RGBColorUpdateQueue : MidiUpdateQueue
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override ShortMessage? CreateMessage(object key, in Color color)
|
||||
protected override ShortMessage? CreateMessage(object key, Color color)
|
||||
{
|
||||
(byte mode, byte id) = ((byte, byte))key;
|
||||
if (mode == 0x00) return null;
|
||||
@@ -165,7 +165,7 @@ public sealed class RGBColorUpdateQueue : MidiUpdateQueue
|
||||
/// </summary>
|
||||
/// <param name="color">The <see cref="Color"/> to convert.</param>
|
||||
/// <returns>The novation-representation of the <see cref="Color"/>.</returns>
|
||||
private static int ConvertColor(in Color color)
|
||||
private static int ConvertColor(Color color)
|
||||
{
|
||||
int bestVelocity = 0;
|
||||
double bestMatchDistance = double.MaxValue;
|
||||
|
||||
Reference in new issue
Block a user