Fix IDE0074, SA1316 and followup CS8141

This commit is contained in:
Gustas
2023-04-09 08:30:30 +03:00
committed by Paul Chote
parent 595717fff0
commit 3ca2bb1d23
3 changed files with 5 additions and 7 deletions

View File

@@ -136,8 +136,8 @@ namespace OpenRA.Mods.Common.Traits
public event Action<Color> OnColorPickerColorUpdate;
(float sMin, float sMax) IColorPickerManagerInfo.SaturationRange => (HsvSaturationRange[0], HsvSaturationRange[1]);
(float vMin, float vMax) IColorPickerManagerInfo.ValueRange => (HsvValueRange[0], HsvValueRange[1]);
(float SMin, float SMax) IColorPickerManagerInfo.SaturationRange => (HsvSaturationRange[0], HsvSaturationRange[1]);
(float VMin, float VMax) IColorPickerManagerInfo.ValueRange => (HsvValueRange[0], HsvValueRange[1]);
Color[] IColorPickerManagerInfo.PresetColors => PresetColors;

View File

@@ -294,8 +294,8 @@ namespace OpenRA.Mods.Common.Traits
public interface IColorPickerManagerInfo : ITraitInfoInterface
{
(float sMin, float sMax) SaturationRange { get; }
(float vMin, float vMax) ValueRange { get; }
(float SMin, float SMax) SaturationRange { get; }
(float VMin, float VMax) ValueRange { get; }
event Action<Color> OnColorPickerColorUpdate;
Color[] PresetColors { get; }
Color RandomPresetColor(MersenneTwister random, IEnumerable<Color> terrainColors, IEnumerable<Color> playerColors);

View File

@@ -61,9 +61,7 @@ namespace OpenRA.Mods.Common.Widgets
minVal = minValue;
maxVal = maxValue;
if (newHue == null)
newHue = H;
newHue ??= H;
var buffer = new byte[4 * 256 * 256];
unsafe
{