From 3b51325f0a059e00ae2080090938f1647e530161 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Sat, 29 Dec 2018 02:42:28 +0200 Subject: [PATCH] Deleted an unused member in type maps. Signed-off-by: Dimitar Dobrev --- src/Generator/Generators/CLI/CLITypePrinter.cs | 1 - src/Generator/Generators/CLI/CLITypeReferences.cs | 1 - src/Generator/Generators/CSharp/CSharpMarshal.cs | 2 -- src/Generator/Generators/CSharp/CSharpTypePrinter.cs | 1 - src/Generator/Types/TypeMap.cs | 1 - src/Generator/Types/TypeMapDatabase.cs | 5 ----- 6 files changed, 11 deletions(-) diff --git a/src/Generator/Generators/CLI/CLITypePrinter.cs b/src/Generator/Generators/CLI/CLITypePrinter.cs index 7334777f..7dd5200f 100644 --- a/src/Generator/Generators/CLI/CLITypePrinter.cs +++ b/src/Generator/Generators/CLI/CLITypePrinter.cs @@ -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(); diff --git a/src/Generator/Generators/CLI/CLITypeReferences.cs b/src/Generator/Generators/CLI/CLITypeReferences.cs index dd345b7e..d47c3c34 100644 --- a/src/Generator/Generators/CLI/CLITypeReferences.cs +++ b/src/Generator/Generators/CLI/CLITypeReferences.cs @@ -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; } diff --git a/src/Generator/Generators/CSharp/CSharpMarshal.cs b/src/Generator/Generators/CSharp/CSharpMarshal.cs index 74d39131..8c528f31 100644 --- a/src/Generator/Generators/CSharp/CSharpMarshal.cs +++ b/src/Generator/Generators/CSharp/CSharpMarshal.cs @@ -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 TypeMap typeMap; if (Context.Context.TypeMaps.FindTypeMap(decl, out typeMap) && typeMap.DoesMarshalling) { - typeMap.Declaration = decl; typeMap.CSharpMarshalToNative(Context); return false; } diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index bcf73f07..4deec6c6 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -324,7 +324,6 @@ namespace CppSharp.Generators.CSharp return decl.Visit(this); } - typeMap.Declaration = decl; typeMap.Type = template; var typePrinterContext = new TypePrinterContext diff --git a/src/Generator/Types/TypeMap.cs b/src/Generator/Types/TypeMap.cs index d3b22c52..adc0fd40 100644 --- a/src/Generator/Types/TypeMap.cs +++ b/src/Generator/Types/TypeMap.cs @@ -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; } diff --git a/src/Generator/Types/TypeMapDatabase.cs b/src/Generator/Types/TypeMapDatabase.cs index af3ad655..2d028862 100644 --- a/src/Generator/Types/TypeMapDatabase.cs +++ b/src/Generator/Types/TypeMapDatabase.cs @@ -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 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 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 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 if (specialization != null && FindTypeMap(specialization.TemplatedDecl.Visit(typePrinter), out typeMap)) { - typeMap.Declaration = decl; typeMap.Type = type; return true; }