Skip to content

Commit 05ce732

Browse files
ds5678SamboyCoding
authored andcommitted
Devirtualize
1 parent 58c7081 commit 05ce732

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Cpp2IL.Core/Model/Contexts/InjectedParameterAnalysisContext.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ public class InjectedParameterAnalysisContext : ParameterAnalysisContext
88
{
99
public override TypeAnalysisContext ParameterTypeContext { get; }
1010

11-
public override bool IsRef => ParameterTypeContext is ByRefTypeAnalysisContext;
12-
1311
public override ParameterAttributes ParameterAttributes => ParameterAttributes.None;
1412

1513
protected override bool IsInjected => true;

Cpp2IL.Core/Model/Contexts/ParameterAnalysisContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class ParameterAnalysisContext : HasCustomAttributesAndName, IParameterIn
5252
/// <summary>
5353
/// True if this parameter is passed by reference.
5454
/// </summary>
55-
public virtual bool IsRef => ParameterType.Byref == 1 || ParameterAttributes.HasFlag(ParameterAttributes.Out);
55+
public bool IsRef => ParameterTypeContext is ByRefTypeAnalysisContext || ParameterAttributes.HasFlag(ParameterAttributes.Out);
5656

5757
/// <summary>
5858
/// The default value data for this parameter. Null if, and only if, the parameter has no default value. If it has a default value of literally null, this will be non-null and have a data index of -1.

0 commit comments

Comments
 (0)