Remove fxcop leftovers (#19772)

* Fixed FxCop leftovers

* Fixed FxCop leftovers
This commit is contained in:
CleanCodeDeveloper
2022-08-09 06:35:46 +02:00
committed by GitHub
parent 1fe9d95322
commit dae63ce3b9
2 changed files with 8 additions and 32 deletions

View File

@@ -643,10 +643,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
set
{
// The fallback value is based on ToRGBHex's behavior, which returns
// #FFFFFF if any exceptions are encountered, e.g. from passing in a null value.
// This extra handling is added here to deal with FxCop warnings.
value = (value != null) ? SettingsUtilities.ToRGBHex(value) : "#FFFFFF";
value = SettingsUtilities.ToRGBHex(value);
if (!value.Equals(_zoneHighlightColor, StringComparison.OrdinalIgnoreCase))
{
_zoneHighlightColor = value;
@@ -665,10 +662,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
set
{
// The fallback value is based on ToRGBHex's behavior, which returns
// #FFFFFF if any exceptions are encountered, e.g. from passing in a null value.
// This extra handling is added here to deal with FxCop warnings.
value = (value != null) ? SettingsUtilities.ToRGBHex(value) : "#FFFFFF";
value = SettingsUtilities.ToRGBHex(value);
if (!value.Equals(_zoneBorderColor, StringComparison.OrdinalIgnoreCase))
{
_zoneBorderColor = value;
@@ -687,10 +681,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
set
{
// The fallback value is based on ToRGBHex's behavior, which returns
// #FFFFFF if any exceptions are encountered, e.g. from passing in a null value.
// This extra handling is added here to deal with FxCop warnings.
value = (value != null) ? SettingsUtilities.ToRGBHex(value) : "#FFFFFF";
value = SettingsUtilities.ToRGBHex(value);
if (!value.Equals(_zoneInActiveColor, StringComparison.OrdinalIgnoreCase))
{
_zoneInActiveColor = value;
@@ -709,10 +700,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
set
{
// The fallback value is based on ToRGBHex's behavior, which returns
// #FFFFFF if any exceptions are encountered, e.g. from passing in a null value.
// This extra handling is added here to deal with FxCop warnings.
value = (value != null) ? SettingsUtilities.ToRGBHex(value) : "#FFFFFF";
value = SettingsUtilities.ToRGBHex(value);
if (!value.Equals(_zoneNumberColor, StringComparison.OrdinalIgnoreCase))
{
_zoneNumberColor = value;