Multiple problems with equality operators fixed

This commit is contained in:
s_falahati 2018-10-20 03:47:32 +03:30
parent f3b3e5ed89
commit 4e45b80f12
5 changed files with 10 additions and 10 deletions

View File

@ -112,12 +112,12 @@ namespace HeliosDisplayManagement.Shared.NVIDIA
public static bool operator ==(SurroundTopology left, SurroundTopology right)
{
return Equals(left, right);
return Equals(left, right) || left?.Equals(right) == true;
}
public static bool operator !=(SurroundTopology left, SurroundTopology right)
{
return !Equals(left, right);
return !(left == right);
}
/// <inheritdoc />

View File

@ -54,12 +54,12 @@ namespace HeliosDisplayManagement.Shared.NVIDIA
public static bool operator ==(SurroundTopologyDisplay left, SurroundTopologyDisplay right)
{
return Equals(left, right);
return Equals(left, right) || left?.Equals(right) == true;
}
public static bool operator !=(SurroundTopologyDisplay left, SurroundTopologyDisplay right)
{
return !Equals(left, right);
return !(left == right);
}
/// <inheritdoc />

View File

@ -145,12 +145,12 @@ namespace HeliosDisplayManagement.Shared
public static bool operator ==(Profile left, Profile right)
{
return Equals(left, right);
return Equals(left, right) || left?.Equals(right) == true;
}
public static bool operator !=(Profile left, Profile right)
{
return !Equals(left, right);
return !(left == right);
}
public static void RefreshActiveStatus()

View File

@ -42,12 +42,12 @@ namespace HeliosDisplayManagement.Shared.Topology
public static bool operator ==(Path left, Path right)
{
return Equals(left, right);
return Equals(left, right) || left?.Equals(right) == true;
}
public static bool operator !=(Path left, Path right)
{
return !Equals(left, right);
return !(left == right);
}
/// <inheritdoc />

View File

@ -58,12 +58,12 @@ namespace HeliosDisplayManagement.Shared.Topology
public static bool operator ==(PathTarget left, PathTarget right)
{
return Equals(left, right);
return Equals(left, right) || left?.Equals(right) == true;
}
public static bool operator !=(PathTarget left, PathTarget right)
{
return !Equals(left, right);
return !(left == right);
}
/// <inheritdoc />