Browse Source

Set the declaration of found type maps.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/890/head
Dimitar Dobrev 8 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 @@ -63,6 +63,7 @@ namespace CppSharp.Types
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}
@ -70,6 +71,7 @@ namespace CppSharp.Types @@ -70,6 +71,7 @@ namespace CppSharp.Types
typePrinter.PrintScopeKind = TypePrintScopeKind.Qualified;
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}
@ -77,6 +79,7 @@ namespace CppSharp.Types @@ -77,6 +79,7 @@ namespace CppSharp.Types
typePrinter.ResolveTypedefs = true;
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}
@ -85,6 +88,7 @@ namespace CppSharp.Types @@ -85,6 +88,7 @@ namespace CppSharp.Types
typePrinter.PrintScopeKind = TypePrintScopeKind.Local;
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}
@ -93,6 +97,7 @@ namespace CppSharp.Types @@ -93,6 +97,7 @@ namespace CppSharp.Types
if (specialization != null &&
FindTypeMap(specialization.TemplatedDecl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}

Loading…
Cancel
Save