Browse Source

Set the declaration of found type maps.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/890/head
Dimitar Dobrev 9 years ago
parent
commit
aab4e6587a
  1. 5
      src/Generator/Types/TypeMapDatabase.cs

5
src/Generator/Types/TypeMapDatabase.cs

@ -63,6 +63,7 @@ namespace CppSharp.Types
if (FindTypeMap(decl.Visit(typePrinter), out typeMap)) if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{ {
typeMap.Declaration = decl;
typeMap.Type = type; typeMap.Type = type;
return true; return true;
} }
@ -70,6 +71,7 @@ namespace CppSharp.Types
typePrinter.PrintScopeKind = TypePrintScopeKind.Qualified; typePrinter.PrintScopeKind = TypePrintScopeKind.Qualified;
if (FindTypeMap(decl.Visit(typePrinter), out typeMap)) if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{ {
typeMap.Declaration = decl;
typeMap.Type = type; typeMap.Type = type;
return true; return true;
} }
@ -77,6 +79,7 @@ namespace CppSharp.Types
typePrinter.ResolveTypedefs = true; typePrinter.ResolveTypedefs = true;
if (FindTypeMap(decl.Visit(typePrinter), out typeMap)) if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{ {
typeMap.Declaration = decl;
typeMap.Type = type; typeMap.Type = type;
return true; return true;
} }
@ -85,6 +88,7 @@ namespace CppSharp.Types
typePrinter.PrintScopeKind = TypePrintScopeKind.Local; typePrinter.PrintScopeKind = TypePrintScopeKind.Local;
if (FindTypeMap(decl.Visit(typePrinter), out typeMap)) if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{ {
typeMap.Declaration = decl;
typeMap.Type = type; typeMap.Type = type;
return true; return true;
} }
@ -93,6 +97,7 @@ namespace CppSharp.Types
if (specialization != null && if (specialization != null &&
FindTypeMap(specialization.TemplatedDecl.Visit(typePrinter), out typeMap)) FindTypeMap(specialization.TemplatedDecl.Visit(typePrinter), out typeMap))
{ {
typeMap.Declaration = decl;
typeMap.Type = type; typeMap.Type = type;
return true; return true;
} }

Loading…
Cancel
Save