Skip to content

Commit 5524d5d

Browse files
committed
修复bug (Uint32 -> UInt32)
增加op_GreaterThanOrEqual\op_LessThanOrEqual 条件判断括号错误
1 parent 16177f1 commit 5524d5d

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

BindGenerater/Generater/C/CTypeResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static BaseTypeResolver Resolve(TypeReference _type,bool il2cppType = fal
2222
return new ValueTypeResolver(_type, il2cppType); //TODO ref String
2323
}
2424

25-
if (_type.IsPointer || _type.Name.Equals("IntPtr") || _type.Name.Equals("UintPtr"))
25+
if (_type.IsPointer || _type.Name.Equals("IntPtr") || _type.Name.Equals("UIntPtr"))
2626
return new ValueTypeResolver(_type, il2cppType);
2727

2828
if (_type.IsPrimitive)

BindGenerater/Generater/CSharp/MethodResolver.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ public virtual string Implement(string name)
103103
paramSeparation = "<";
104104
else if (method.Name == "op_GreaterThan")
105105
paramSeparation = ">";
106+
else if (method.Name == "op_GreaterThanOrEqual")
107+
paramSeparation = ">=";
108+
else if (method.Name == "op_LessThanOrEqual")
109+
paramSeparation = "<=";
106110
else if (method.Name == "op_Explicit")
107111
CS.Writer.Write($"({TypeResolver.Resolve(method.ReturnType).RealTypeName()})");
108112
else if (method.Name == "op_UnaryNegation")

BindGenerater/Generater/Utils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public static bool Filter(TypeReference type)
272272

273273

274274
var td = type.Resolve();
275-
if (td != null && IsObsolete(td) || td.IsInterface)
275+
if (td != null && (IsObsolete(td) || td.IsInterface))
276276
{
277277
DropTypes.Add(type);
278278
return false;

0 commit comments

Comments
 (0)