Browse Source

Fixed type map finding not setting the type in the type map in one exit of the method.

pull/61/merge
triton 12 years ago
parent
commit
a7def2de27
  1. 8
      src/Generator/Types/TypeMap.cs
  2. 10
      src/Generator/Types/Types.cs

8
src/Generator/Types/TypeMap.cs

@ -146,7 +146,13 @@ namespace CppSharp.Types @@ -146,7 +146,13 @@ namespace CppSharp.Types
if (output.StartsWith("::"))
output = output.Substring(2);
return FindTypeMap(output, out typeMap);
if (FindTypeMap(output, out typeMap))
{
typeMap.Type = type;
return true;
}
return false;
}
public bool FindTypeMapRecursive(Type type, out TypeMap typeMap)

10
src/Generator/Types/Types.cs

@ -49,10 +49,10 @@ namespace CppSharp @@ -49,10 +49,10 @@ namespace CppSharp
return VisitDeclaration(decl.CompleteDeclaration);
TypeMap typeMap;
if (TypeMapDatabase.FindTypeMap(decl, out typeMap))
if (TypeMapDatabase.FindTypeMap(decl, out typeMap)
&& typeMap.IsIgnored)
{
if (typeMap.IsIgnored)
Ignore();
Ignore();
return false;
}
@ -100,10 +100,8 @@ namespace CppSharp @@ -100,10 +100,8 @@ namespace CppSharp
public override bool VisitTemplateSpecializationType(
TemplateSpecializationType template, TypeQualifiers quals)
{
var decl = template.Template.TemplatedDecl;
TypeMap typeMap;
if (TypeMapDatabase.FindTypeMap(decl, out typeMap))
if (TypeMapDatabase.FindTypeMap(template, out typeMap))
{
if (typeMap.IsIgnored)
Ignore();

Loading…
Cancel
Save