少年修仙传客户端基础资源
hch
2024-04-01 d01413b00ef631ac20347716b23818b0b811f65f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "il2cpp-config.h"
#include "il2cpp-class-internals.h"
#include "Il2CppGenericInstCompare.h"
#include "Il2CppTypeCompare.h"
 
namespace il2cpp
{
namespace metadata
{
    bool Il2CppGenericInstCompare::operator()(const KeyWrapper<const Il2CppGenericInst*>& t1, const KeyWrapper<const Il2CppGenericInst*>& t2) const
    {
        return Compare(t1, t2);
    }
 
    bool Il2CppGenericInstCompare::Compare(const KeyWrapper<const Il2CppGenericInst*>& t1, const KeyWrapper<const Il2CppGenericInst*>& t2)
    {
        if (t1.type != t2.type)
            return false;
        else if (!t1.isNormal())
            return true;
 
        return AreEqual(t1.key, t2.key);
    }
 
    bool Il2CppGenericInstCompare::Compare(const Il2CppGenericInst* t1, const Il2CppGenericInst* t2)
    {
        if (t1)
        {
            return t2 && AreEqual(t1, t2);
        }
        else
        {
            return !t2;
        }
    }
 
    bool Il2CppGenericInstCompare::AreEqual(const Il2CppGenericInst* t1, const Il2CppGenericInst* t2)
    {
        if (t1->type_argc != t2->type_argc)
            return false;
 
        for (size_t i = 0; i < t1->type_argc; ++i)
        {
            if (!Il2CppTypeEqualityComparer::AreEqual(t1->type_argv[i], t2->type_argv[i]))
                return false;
        }
 
        return true;
    }
} /* namespace vm */
} /* namespace il2cpp */