Browse Source

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

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

8
src/Generator/Types/TypeMap.cs

@ -146,7 +146,13 @@ namespace CppSharp.Types
if (output.StartsWith("::")) if (output.StartsWith("::"))
output = output.Substring(2); 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) public bool FindTypeMapRecursive(Type type, out TypeMap typeMap)

8
src/Generator/Types/Types.cs

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

Loading…
Cancel
Save