move == operator from Actor class to Object class
This commit is contained in:
@@ -357,27 +357,5 @@ namespace FlaxEngine
|
||||
{
|
||||
return $"{Name} ({GetType().Name})";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if Actors are equals
|
||||
/// </summary>
|
||||
/// <param name="left"></param>
|
||||
/// <param name="right"></param>
|
||||
/// <returns></returns>
|
||||
public static bool operator ==(Actor left, Actor right)
|
||||
{
|
||||
return Object.Equals(left, right);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if Actors aren't equals
|
||||
/// </summary>
|
||||
/// <param name="left"></param>
|
||||
/// <param name="right"></param>
|
||||
/// <returns></returns>
|
||||
public static bool operator !=(Actor left, Actor right)
|
||||
{
|
||||
return !Object.Equals(left, right);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,6 +205,30 @@ namespace FlaxEngine
|
||||
return obj != null && obj.__unmanagedPtr != IntPtr.Zero;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="left"></param>
|
||||
/// <param name="right"></param>
|
||||
/// <returns></returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool operator == (Object left, Object right)
|
||||
{
|
||||
return Object.Equals(left, right);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="left"></param>
|
||||
/// <param name="right"></param>
|
||||
/// <returns></returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool operator !=(Object left, Object right)
|
||||
{
|
||||
return !Object.Equals(left, right);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the pointer to the native object. Handles null object reference (returns zero).
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user