mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Multiple problems with equality operators fixed
This commit is contained in:
parent
f3b3e5ed89
commit
4e45b80f12
@ -112,12 +112,12 @@ namespace HeliosDisplayManagement.Shared.NVIDIA
|
|||||||
|
|
||||||
public static bool operator ==(SurroundTopology left, SurroundTopology right)
|
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)
|
public static bool operator !=(SurroundTopology left, SurroundTopology right)
|
||||||
{
|
{
|
||||||
return !Equals(left, right);
|
return !(left == right);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
@ -54,12 +54,12 @@ namespace HeliosDisplayManagement.Shared.NVIDIA
|
|||||||
|
|
||||||
public static bool operator ==(SurroundTopologyDisplay left, SurroundTopologyDisplay right)
|
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)
|
public static bool operator !=(SurroundTopologyDisplay left, SurroundTopologyDisplay right)
|
||||||
{
|
{
|
||||||
return !Equals(left, right);
|
return !(left == right);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
@ -145,12 +145,12 @@ namespace HeliosDisplayManagement.Shared
|
|||||||
|
|
||||||
public static bool operator ==(Profile left, Profile right)
|
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)
|
public static bool operator !=(Profile left, Profile right)
|
||||||
{
|
{
|
||||||
return !Equals(left, right);
|
return !(left == right);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void RefreshActiveStatus()
|
public static void RefreshActiveStatus()
|
||||||
|
@ -42,12 +42,12 @@ namespace HeliosDisplayManagement.Shared.Topology
|
|||||||
|
|
||||||
public static bool operator ==(Path left, Path right)
|
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)
|
public static bool operator !=(Path left, Path right)
|
||||||
{
|
{
|
||||||
return !Equals(left, right);
|
return !(left == right);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
@ -58,12 +58,12 @@ namespace HeliosDisplayManagement.Shared.Topology
|
|||||||
|
|
||||||
public static bool operator ==(PathTarget left, PathTarget right)
|
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)
|
public static bool operator !=(PathTarget left, PathTarget right)
|
||||||
{
|
{
|
||||||
return !Equals(left, right);
|
return !(left == right);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
Loading…
Reference in New Issue
Block a user