|
|
@ -22,6 +22,9 @@ namespace CppSharp.Generators.Cpp |
|
|
|
|
|
|
|
|
|
|
|
public override void VisitDeclContextFunctions(DeclarationContext context) |
|
|
|
public override void VisitDeclContextFunctions(DeclarationContext context) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
if (!VisitOptions.VisitNamespaceFunctions) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
var functions = context.Functions.Where(f => !ASTUtils.CheckIgnoreFunction(f)).ToList(); |
|
|
|
var functions = context.Functions.Where(f => !ASTUtils.CheckIgnoreFunction(f)).ToList(); |
|
|
|
var unique = functions.GroupBy(m => m.Name); |
|
|
|
var unique = functions.GroupBy(m => m.Name); |
|
|
|
foreach (var group in unique) |
|
|
|
foreach (var group in unique) |
|
|
@ -46,6 +49,7 @@ namespace CppSharp.Generators.Cpp |
|
|
|
{ |
|
|
|
{ |
|
|
|
var constructors = @class.Constructors.Where(c => c.IsGenerated && !c.IsCopyConstructor) |
|
|
|
var constructors = @class.Constructors.Where(c => c.IsGenerated && !c.IsCopyConstructor) |
|
|
|
.ToList(); |
|
|
|
.ToList(); |
|
|
|
|
|
|
|
|
|
|
|
if (!constructors.Any()) |
|
|
|
if (!constructors.Any()) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
@ -57,12 +61,14 @@ namespace CppSharp.Generators.Cpp |
|
|
|
if (!function.IsGenerated) |
|
|
|
if (!function.IsGenerated) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
if (function is Method method) |
|
|
|
if (!(function is Method method)) |
|
|
|
{ |
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
if (method.IsConstructor || method.IsDestructor) |
|
|
|
if (method.IsConstructor || method.IsDestructor) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
if (method.IsOperator) |
|
|
|
if (method.IsOperator) |
|
|
|
|
|
|
|
{ |
|
|
|
if (method.OperatorKind == CXXOperatorKind.Conversion || |
|
|
|
if (method.OperatorKind == CXXOperatorKind.Conversion || |
|
|
|
method.OperatorKind == CXXOperatorKind.Equal) |
|
|
|
method.OperatorKind == CXXOperatorKind.Equal) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|