Skip to content

Commit

Permalink
unity 5.5 language syntax cpmat
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieyang committed Dec 29, 2021
1 parent 928baa8 commit 881e8fc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions unity/Assets/Puerts/Src/Editor/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,9 @@ public class TsParameterGenInfo
public bool IsOptional;
public override bool Equals(object obj)
{
if (obj != null && obj is TsParameterGenInfo info)
if (obj != null && obj is TsParameterGenInfo)
{
TsParameterGenInfo info = (TsParameterGenInfo)obj;
return this.Name == info.Name &&
this.TypeName == info.TypeName &&
this.IsByRef == info.IsByRef &&
Expand Down Expand Up @@ -860,8 +861,9 @@ public class TsMethodGenInfo
public bool IsStatic;
public override bool Equals(object obj)
{
if (obj != null && obj is TsMethodGenInfo info)
if (obj != null && obj is TsMethodGenInfo)
{
TsMethodGenInfo info = (TsMethodGenInfo)obj;
if (this.ParameterInfos.Length != info.ParameterInfos.Length ||
this.Name != info.Name ||
this.TypeName != info.TypeName ||
Expand Down Expand Up @@ -1267,7 +1269,8 @@ private static Dictionary<string, List<TsMethodGenInfo>> MethodGenInfosToDict(IE

foreach (var info in methodInfos)
{
if (!result.TryGetValue(info.Name, out var list))
List<TsMethodGenInfo> list;
if (!result.TryGetValue(info.Name, out list))
{
list = new List<TsMethodGenInfo>();
result.Add(info.Name, list);
Expand Down

0 comments on commit 881e8fc

Please sign in to comment.