Browse Source

Fixed CheckDuplicatedNamesPass to work with functions.

pull/222/head
triton 12 years ago
parent
commit
f6ca256a86
  1. 15
      src/Generator/Passes/CheckDuplicatedNamesPass.cs

15
src/Generator/Passes/CheckDuplicatedNamesPass.cs

@ -118,6 +118,18 @@ namespace CppSharp.Passes
return false; return false;
} }
public override bool VisitFunctionDecl(Function decl)
{
if (!VisitDeclaration(decl))
return false;
if (ASTUtils.CheckIgnoreFunction(decl))
return false;
CheckDuplicate(decl);
return false;
}
public override bool VisitMethodDecl(Method decl) public override bool VisitMethodDecl(Method decl)
{ {
if (!VisitDeclaration(decl)) if (!VisitDeclaration(decl))
@ -145,6 +157,9 @@ namespace CppSharp.Passes
foreach (var method in @class.Methods) foreach (var method in @class.Methods)
VisitMethodDecl(method); VisitMethodDecl(method);
foreach (var function in @class.Functions)
VisitFunctionDecl(function);
foreach (var field in @class.Fields) foreach (var field in @class.Fields)
VisitFieldDecl(field); VisitFieldDecl(field);

Loading…
Cancel
Save