@@ -2071,7 +2071,7 @@ c is ClassTemplateSpecialization ?
2071
2071
private void GenerateDestructorCall ( Method dtor )
2072
2072
{
2073
2073
var @class = ( Class ) dtor . Namespace ;
2074
- GenerateVirtualFunctionCall ( dtor , @class , true ) ;
2074
+ GenerateVirtualFunctionCall ( dtor , true ) ;
2075
2075
if ( @class . IsAbstract )
2076
2076
{
2077
2077
UnindentAndWriteCloseBrace ( ) ;
@@ -2416,11 +2416,11 @@ private void GenerateMethodBody(Class @class, Method method,
2416
2416
}
2417
2417
else if ( method . SynthKind == FunctionSynthKind . AbstractImplCall )
2418
2418
{
2419
- GenerateVirtualFunctionCall ( method , @class . BaseClass ) ;
2419
+ GenerateVirtualFunctionCall ( method ) ;
2420
2420
}
2421
2421
else if ( method . IsVirtual )
2422
2422
{
2423
- GenerateVirtualFunctionCall ( method , @class ) ;
2423
+ GenerateVirtualFunctionCall ( method ) ;
2424
2424
}
2425
2425
else
2426
2426
{
@@ -2548,30 +2548,31 @@ private void GenerateVirtualPropertyCall(Method method, Class @class,
2548
2548
WriteLine ( parameters == null ?
2549
2549
"return base.{0};" : "base.{0} = value;" , property . Name ) ;
2550
2550
else
2551
- GenerateFunctionCall ( GetVirtualCallDelegate ( method , @class ) ,
2551
+ GenerateFunctionCall ( GetVirtualCallDelegate ( method ) ,
2552
2552
parameters ?? method . Parameters , method , returnType ) ;
2553
2553
}
2554
2554
2555
- private void GenerateVirtualFunctionCall ( Method method , Class @class ,
2555
+ private void GenerateVirtualFunctionCall ( Method method ,
2556
2556
bool forceVirtualCall = false )
2557
2557
{
2558
2558
if ( ! forceVirtualCall && method . IsGeneratedOverride ( ) &&
2559
2559
! method . BaseMethod . IsPure )
2560
2560
GenerateManagedCall ( method , true ) ;
2561
2561
else
2562
- GenerateFunctionCall ( GetVirtualCallDelegate ( method , @class ) ,
2562
+ GenerateFunctionCall ( GetVirtualCallDelegate ( method ) ,
2563
2563
method . Parameters , method ) ;
2564
2564
}
2565
2565
2566
- private string GetVirtualCallDelegate ( Method method , Class @class )
2566
+ private string GetVirtualCallDelegate ( Method method )
2567
2567
{
2568
2568
Function @virtual = method ;
2569
2569
if ( method . OriginalFunction != null &&
2570
2570
! ( ( Class ) method . OriginalFunction . Namespace ) . IsInterface )
2571
2571
@virtual = method . OriginalFunction ;
2572
2572
2573
- var i = VTables . GetVTableIndex ( @virtual , @class ) ;
2573
+ var i = VTables . GetVTableIndex ( @virtual ) ;
2574
2574
int vtableIndex = 0 ;
2575
+ var @class = ( Class ) method . Namespace ;
2575
2576
if ( Context . ParserOptions . IsMicrosoftAbi )
2576
2577
vtableIndex = @class . Layout . VFTables . IndexOf ( @class . Layout . VFTables . Where (
2577
2578
v => v . Layout . Components . Any ( c => c . Method == @virtual ) ) . First ( ) ) ;
0 commit comments