Skip to content

Commit 3b51325

Browse files
committed
Deleted an unused member in type maps.
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 8f762da commit 3b51325

File tree

6 files changed

+0
-11
lines changed

6 files changed

+0
-11
lines changed

src/Generator/Generators/CLI/CLITypePrinter.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ public override TypePrinterResult VisitTemplateSpecializationType(
225225
TypeMap typeMap = null;
226226
if (TypeMapDatabase.FindTypeMap(template, out typeMap) && !typeMap.IsIgnored)
227227
{
228-
typeMap.Declaration = decl;
229228
typeMap.Type = template;
230229
var typePrinterContext = new TypePrinterContext { Type = template };
231230
return typeMap.CLISignatureType(typePrinterContext).ToString();

src/Generator/Generators/CLI/CLITypeReferences.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ private void GenerateInclude(ASTRecord<Declaration> record)
107107
TypeMap typeMap;
108108
if (TypeMapDatabase.FindTypeMap(record.Value, out typeMap))
109109
{
110-
typeMap.Declaration = record.Value;
111110
typeMap.CLITypeReference(this, record);
112111
return;
113112
}

src/Generator/Generators/CSharp/CSharpMarshal.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public override bool VisitDeclaration(Declaration decl)
6666
TypeMap typeMap;
6767
if (Context.Context.TypeMaps.FindTypeMap(decl, out typeMap) && typeMap.DoesMarshalling)
6868
{
69-
typeMap.Declaration = decl;
7069
typeMap.CSharpMarshalToManaged(Context);
7170
return false;
7271
}
@@ -483,7 +482,6 @@ public override bool VisitDeclaration(Declaration decl)
483482
TypeMap typeMap;
484483
if (Context.Context.TypeMaps.FindTypeMap(decl, out typeMap) && typeMap.DoesMarshalling)
485484
{
486-
typeMap.Declaration = decl;
487485
typeMap.CSharpMarshalToNative(Context);
488486
return false;
489487
}

src/Generator/Generators/CSharp/CSharpTypePrinter.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ public override TypePrinterResult VisitTemplateSpecializationType(
324324
return decl.Visit(this);
325325
}
326326

327-
typeMap.Declaration = decl;
328327
typeMap.Type = template;
329328

330329
var typePrinterContext = new TypePrinterContext

src/Generator/Types/TypeMap.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public TypeMapAttribute(string type, GeneratorKind generatorKind)
3737
public class TypeMap
3838
{
3939
public Type Type { get; set; }
40-
public Declaration Declaration { get; set; }
4140
public ASTContext ASTContext { get; set; }
4241
public ITypeMapDatabase TypeMapDatabase { get; set; }
4342

src/Generator/Types/TypeMapDatabase.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,20 @@ public bool FindTypeMap(Declaration decl, Type type, out TypeMap typeMap)
5757

5858
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
5959
{
60-
typeMap.Declaration = decl;
6160
typeMap.Type = type;
6261
return true;
6362
}
6463

6564
typePrinter.PrintScopeKind = TypePrintScopeKind.Qualified;
6665
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
6766
{
68-
typeMap.Declaration = decl;
6967
typeMap.Type = type;
7068
return true;
7169
}
7270

7371
typePrinter.ResolveTypedefs = true;
7472
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
7573
{
76-
typeMap.Declaration = decl;
7774
typeMap.Type = type;
7875
return true;
7976
}
@@ -82,7 +79,6 @@ public bool FindTypeMap(Declaration decl, Type type, out TypeMap typeMap)
8279
typePrinter.PrintScopeKind = TypePrintScopeKind.Local;
8380
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
8481
{
85-
typeMap.Declaration = decl;
8682
typeMap.Type = type;
8783
return true;
8884
}
@@ -91,7 +87,6 @@ public bool FindTypeMap(Declaration decl, Type type, out TypeMap typeMap)
9187
if (specialization != null &&
9288
FindTypeMap(specialization.TemplatedDecl.Visit(typePrinter), out typeMap))
9389
{
94-
typeMap.Declaration = decl;
9590
typeMap.Type = type;
9691
return true;
9792
}

0 commit comments

Comments
 (0)