Browse Source

Deleted an unused member in type maps.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1146/head
Dimitar Dobrev 7 years ago
parent
commit
3b51325f0a
  1. 1
      src/Generator/Generators/CLI/CLITypePrinter.cs
  2. 1
      src/Generator/Generators/CLI/CLITypeReferences.cs
  3. 2
      src/Generator/Generators/CSharp/CSharpMarshal.cs
  4. 1
      src/Generator/Generators/CSharp/CSharpTypePrinter.cs
  5. 1
      src/Generator/Types/TypeMap.cs
  6. 5
      src/Generator/Types/TypeMapDatabase.cs

1
src/Generator/Generators/CLI/CLITypePrinter.cs

@ -225,7 +225,6 @@ namespace CppSharp.Generators.CLI
TypeMap typeMap = null; TypeMap typeMap = null;
if (TypeMapDatabase.FindTypeMap(template, out typeMap) && !typeMap.IsIgnored) if (TypeMapDatabase.FindTypeMap(template, out typeMap) && !typeMap.IsIgnored)
{ {
typeMap.Declaration = decl;
typeMap.Type = template; typeMap.Type = template;
var typePrinterContext = new TypePrinterContext { Type = template }; var typePrinterContext = new TypePrinterContext { Type = template };
return typeMap.CLISignatureType(typePrinterContext).ToString(); return typeMap.CLISignatureType(typePrinterContext).ToString();

1
src/Generator/Generators/CLI/CLITypeReferences.cs

@ -107,7 +107,6 @@ namespace CppSharp.Generators.CLI
TypeMap typeMap; TypeMap typeMap;
if (TypeMapDatabase.FindTypeMap(record.Value, out typeMap)) if (TypeMapDatabase.FindTypeMap(record.Value, out typeMap))
{ {
typeMap.Declaration = record.Value;
typeMap.CLITypeReference(this, record); typeMap.CLITypeReference(this, record);
return; return;
} }

2
src/Generator/Generators/CSharp/CSharpMarshal.cs

@ -66,7 +66,6 @@ namespace CppSharp.Generators.CSharp
TypeMap typeMap; TypeMap typeMap;
if (Context.Context.TypeMaps.FindTypeMap(decl, out typeMap) && typeMap.DoesMarshalling) if (Context.Context.TypeMaps.FindTypeMap(decl, out typeMap) && typeMap.DoesMarshalling)
{ {
typeMap.Declaration = decl;
typeMap.CSharpMarshalToManaged(Context); typeMap.CSharpMarshalToManaged(Context);
return false; return false;
} }
@ -483,7 +482,6 @@ namespace CppSharp.Generators.CSharp
TypeMap typeMap; TypeMap typeMap;
if (Context.Context.TypeMaps.FindTypeMap(decl, out typeMap) && typeMap.DoesMarshalling) if (Context.Context.TypeMaps.FindTypeMap(decl, out typeMap) && typeMap.DoesMarshalling)
{ {
typeMap.Declaration = decl;
typeMap.CSharpMarshalToNative(Context); typeMap.CSharpMarshalToNative(Context);
return false; return false;
} }

1
src/Generator/Generators/CSharp/CSharpTypePrinter.cs

@ -324,7 +324,6 @@ namespace CppSharp.Generators.CSharp
return decl.Visit(this); return decl.Visit(this);
} }
typeMap.Declaration = decl;
typeMap.Type = template; typeMap.Type = template;
var typePrinterContext = new TypePrinterContext var typePrinterContext = new TypePrinterContext

1
src/Generator/Types/TypeMap.cs

@ -37,7 +37,6 @@ namespace CppSharp.Types
public class TypeMap public class TypeMap
{ {
public Type Type { get; set; } public Type Type { get; set; }
public Declaration Declaration { get; set; }
public ASTContext ASTContext { get; set; } public ASTContext ASTContext { get; set; }
public ITypeMapDatabase TypeMapDatabase { get; set; } public ITypeMapDatabase TypeMapDatabase { get; set; }

5
src/Generator/Types/TypeMapDatabase.cs

@ -57,7 +57,6 @@ 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;
} }
@ -65,7 +64,6 @@ 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;
} }
@ -73,7 +71,6 @@ 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;
} }
@ -82,7 +79,6 @@ 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;
} }
@ -91,7 +87,6 @@ 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