From 96674f2cc46b110292330809142bfd0b0aae3958 Mon Sep 17 00:00:00 2001 From: triton Date: Sat, 18 May 2013 15:49:53 +0100 Subject: [PATCH] When checking for ignored declarations: check the complete version of the declaration if there is one, use the type map if one is found, or ignore the declaration if it is not generated. --- src/Generator/Types/Types.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Generator/Types/Types.cs b/src/Generator/Types/Types.cs index 2f068f68..eea3e46b 100644 --- a/src/Generator/Types/Types.cs +++ b/src/Generator/Types/Types.cs @@ -72,18 +72,19 @@ namespace CppSharp public override bool VisitDeclaration(Declaration decl) { - if (decl.Ignore) - Ignore(); + if (decl.CompleteDeclaration != null) + return VisitDeclaration(decl.CompleteDeclaration); - return true; - } + TypeMap typeMap; + if (TypeMapDatabase.FindTypeMap(decl, out typeMap)) + return typeMap.IsIgnored; - public override bool VisitClassDecl(Class @class) - { - if (AlreadyVisited(@class)) + if (!decl.IsGenerated) + { + Ignore(); return false; + } - VisitDeclaration(@class); return true; }