mirror of https://github.com/mono/CppSharp.git
c-sharpdotnetmonobindingsbridgecclangcpluspluscppsharpglueinteropparserparsingpinvokeswigsyntax-treevisitorsxamarinxamarin-bindings
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
660 B
20 lines
660 B
using CppSharp.AST; |
|
|
|
namespace CppSharp.Passes |
|
{ |
|
public class FixDefaultParamValuesOfOverridesPass : TranslationUnitPass |
|
{ |
|
public override bool VisitMethodDecl(Method method) |
|
{ |
|
if (method.IsOverride && !method.IsSynthetized) |
|
{ |
|
Method rootBaseMethod = ((Class) method.Namespace).GetRootBaseMethod(method); |
|
for (int i = 0; i < method.Parameters.Count; i++) |
|
{ |
|
method.Parameters[i].DefaultArgument = rootBaseMethod.Parameters[i].DefaultArgument; |
|
} |
|
} |
|
return base.VisitMethodDecl(method); |
|
} |
|
} |
|
}
|
|
|