Fix after merge

This commit is contained in:
Wojtek Figat
2023-02-13 10:52:11 +01:00
parent ac59cc4633
commit 45a0b25ee4
3 changed files with 18 additions and 4 deletions

View File

@@ -242,7 +242,7 @@ namespace FlaxEditor.CustomEditors
if (objA == null && objB is string objBStr && objBStr.Length == 0)
return true;
return Newtonsoft.Json.Utilities.MiscellaneousUtils.DefaultValueEquals(objA, objB);
return Newtonsoft.Json.Utilities.MiscellaneousUtils.ValueEquals(objA, objB);
}
/// <summary>

View File

@@ -2622,13 +2622,13 @@ namespace FlaxEngine
}
[UnmanagedCallersOnly]
internal static byte TypeIsSubclassOf(ManagedHandle typeHandle, ManagedHandle othertypeHandle, byte checkInterfaces)
internal static byte TypeIsSubclassOf(ManagedHandle typeHandle, ManagedHandle otherTypeHandle, byte checkInterfaces)
{
if (typeHandle == othertypeHandle)
if (typeHandle == otherTypeHandle)
return 1;
Type type = Unsafe.As<Type>(typeHandle.Target);
Type otherType = Unsafe.As<Type>(othertypeHandle.Target);
Type otherType = Unsafe.As<Type>(otherTypeHandle.Target);
if (type == otherType)
return 1;
@@ -2642,6 +2642,14 @@ namespace FlaxEngine
return type.IsSubclassOf(otherType) ? (byte)1 : (byte)0;
}
[UnmanagedCallersOnly]
internal static byte TypeIsAssignableFrom(ManagedHandle typeHandle, ManagedHandle otherTypeHandle)
{
Type type = Unsafe.As<Type>(typeHandle.Target);
Type otherType = Unsafe.As<Type>(otherTypeHandle.Target);
return (byte)(type.IsAssignableFrom(otherType) ? 1 : 0);
}
[UnmanagedCallersOnly]
internal static byte TypeIsValueType(ManagedHandle typeHandle)
{

View File

@@ -1239,6 +1239,12 @@ MONO_API mono_bool mono_class_is_subclass_of(MonoClass* klass, MonoClass* klassc
return CoreCLR::CallStaticMethod<bool, void*, void*, bool>(TypeIsSubclassOfPtr, ((CoreCLRClass*)klass)->GetTypeHandle(), ((CoreCLRClass*)klassc)->GetTypeHandle(), check_interfaces);
}
MONO_API mono_bool mono_class_is_assignable_from(MonoClass *klass, MonoClass *oklass)
{
static void* TypeIsAssignableFrom = CoreCLR::GetStaticMethodPointer(TEXT("TypeIsAssignableFrom"));
return CoreCLR::CallStaticMethod<bool, void*, void*>(TypeIsAssignableFrom, ((CoreCLRClass*)klass)->GetTypeHandle(), ((CoreCLRClass*)oklass)->GetTypeHandle());
}
MONO_API char* mono_type_get_name(MonoType* type)
{
CoreCLRClass* klass = (CoreCLRClass*)mono_type_get_class(type);