From 37bccb446d7ee0cbb055ef486a331c159f813a30 Mon Sep 17 00:00:00 2001 From: triton Date: Sun, 16 Feb 2014 21:29:39 +0000 Subject: [PATCH] Removed type map matching from VisitDeclaration. We should only try to find type maps for types, else we can match type maps wrongly if the declaration name happens to have the same name as the one the type map tries to match on. --- src/Generator/Generators/CLI/CLIMarshal.cs | 26 ---------------------- 1 file changed, 26 deletions(-) diff --git a/src/Generator/Generators/CLI/CLIMarshal.cs b/src/Generator/Generators/CLI/CLIMarshal.cs index 1ddebc2e..ad493c23 100644 --- a/src/Generator/Generators/CLI/CLIMarshal.cs +++ b/src/Generator/Generators/CLI/CLIMarshal.cs @@ -194,19 +194,6 @@ namespace CppSharp.Generators.CLI throw new NotImplementedException(); } - public override bool VisitDeclaration(Declaration decl) - { - TypeMap typeMap; - if (Context.Driver.TypeDatabase.FindTypeMap(decl, out typeMap)) - { - typeMap.Declaration = decl; - typeMap.CLIMarshalToManaged(Context); - return false; - } - - return true; - } - public override bool VisitClassDecl(Class @class) { if (@class.CompleteDeclaration != null) @@ -536,19 +523,6 @@ namespace CppSharp.Generators.CLI throw new NotImplementedException(); } - public override bool VisitDeclaration(Declaration decl) - { - TypeMap typeMap; - if (Context.Driver.TypeDatabase.FindTypeMap(decl, out typeMap)) - { - typeMap.Declaration = decl; - typeMap.CLIMarshalToNative(Context); - return false; - } - - return true; - } - public override bool VisitClassDecl(Class @class) { if (@class.CompleteDeclaration != null)