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

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

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

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

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

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

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

1
src/Generator/Types/TypeMap.cs

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

5
src/Generator/Types/TypeMapDatabase.cs

@ -57,7 +57,6 @@ namespace CppSharp.Types @@ -57,7 +57,6 @@ namespace CppSharp.Types
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}
@ -65,7 +64,6 @@ namespace CppSharp.Types @@ -65,7 +64,6 @@ namespace CppSharp.Types
typePrinter.PrintScopeKind = TypePrintScopeKind.Qualified;
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}
@ -73,7 +71,6 @@ namespace CppSharp.Types @@ -73,7 +71,6 @@ namespace CppSharp.Types
typePrinter.ResolveTypedefs = true;
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}
@ -82,7 +79,6 @@ namespace CppSharp.Types @@ -82,7 +79,6 @@ namespace CppSharp.Types
typePrinter.PrintScopeKind = TypePrintScopeKind.Local;
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}
@ -91,7 +87,6 @@ namespace CppSharp.Types @@ -91,7 +87,6 @@ namespace CppSharp.Types
if (specialization != null &&
FindTypeMap(specialization.TemplatedDecl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}

Loading…
Cancel
Save