Skip to content

Commit

Permalink
Avoid adding garbage data
Browse files Browse the repository at this point in the history
  • Loading branch information
hazzik committed Jun 27, 2024
1 parent 27ee8c4 commit 9b98ab9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions projects/GKCore/GDModel/GDMLocationRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ public GDMList<GDMLocationName> GetFullNames(GDMTree tree, ATDEnumeration atdEnu
var topLoc = tree.GetPtrValue<GDMLocationRecord>(topLevel);
if (topLoc == null) continue;

bool wasJoin = false;
var topNames = topLoc.GetFullNames(tree, atdEnum, abbreviations);
for (int i = 0; i < topNames.Count; i++) {
var topName = topNames[i];
Expand All @@ -198,13 +197,8 @@ public GDMList<GDMLocationName> GetFullNames(GDMTree tree, ATDEnumeration atdEnu
if (!interDate.IsEmpty()) {
string tnVal = (abbreviations && !string.IsNullOrEmpty(topName.Abbreviation)) ? topName.Abbreviation : topName.StringValue;
topBuffer.Add(new GDMLocationName(tnVal, interDate));
wasJoin = true;
}
}

if (!wasJoin && topNames.Count > 0) {
topBuffer.Add(new GDMLocationName(topNames[topNames.Count - 1].StringValue, topLevel.Date.Value));
}
}

// search of intersections of location names and intersections of top levels/names
Expand Down

0 comments on commit 9b98ab9

Please sign in to comment.