Skip to content

Commit

Permalink
Minor fix to GEDCOM tag hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Serg-Norseman committed Jul 2, 2024
1 parent e7b8741 commit fd925af
Show file tree
Hide file tree
Showing 46 changed files with 136 additions and 146 deletions.
18 changes: 8 additions & 10 deletions projects/GKCore/GDModel/GDMAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,14 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddHash(fLines.GetHashCode());

hashCode.AddObj(fAddressLine1);
hashCode.AddObj(fAddressLine2);
hashCode.AddObj(fAddressLine3);
hashCode.AddObj(fAddressCity);
hashCode.AddObj(fAddressState);
hashCode.AddObj(fAddressPostalCode);
hashCode.AddObj(fAddressCountry);

hashCode.Add(fLines);
hashCode.Add(fAddressLine1);
hashCode.Add(fAddressLine2);
hashCode.Add(fAddressLine3);
hashCode.Add(fAddressCity);
hashCode.Add(fAddressState);
hashCode.Add(fAddressPostalCode);
hashCode.Add(fAddressCountry);
ProcessHashes(ref hashCode, fPhoneList);
ProcessHashes(ref hashCode, fEmailList);
ProcessHashes(ref hashCode, fFaxList);
Expand Down
2 changes: 1 addition & 1 deletion projects/GKCore/GDModel/GDMAssociation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fRelation);
hashCode.Add(fRelation);

ProcessHashes(ref hashCode, fSourceCitations);
}
Expand Down
2 changes: 1 addition & 1 deletion projects/GKCore/GDModel/GDMChangeDate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddVal(fChangeDateTime);
hashCode.Add(fChangeDateTime);
}
}
}
4 changes: 2 additions & 2 deletions projects/GKCore/GDModel/GDMChildToFamilyLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddVal(fChildLinkageStatus);
hashCode.AddVal(fPedigreeLinkageType);
hashCode.Add(fChildLinkageStatus);
hashCode.Add(fPedigreeLinkageType);
}
}
}
10 changes: 5 additions & 5 deletions projects/GKCore/GDModel/GDMCommunicationRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fCommName);
hashCode.AddVal(fCommunicationType);
hashCode.AddObj(fDate);
hashCode.AddVal(fCommDirection);
hashCode.AddObj(fCorresponder);
hashCode.Add(fCommName);
hashCode.Add(fCommunicationType);
hashCode.Add(fDate);
hashCode.Add(fCommDirection);
hashCode.Add(fCorresponder);
}
}
}
16 changes: 8 additions & 8 deletions projects/GKCore/GDModel/GDMCustomEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,14 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fAddress);
hashCode.AddObj(fAgency);
hashCode.AddObj(fCause);
hashCode.AddObj(fClassification);
hashCode.AddObj(fDate);
hashCode.AddObj(fPlace);
hashCode.AddObj(fReligiousAffilation);
hashCode.AddVal(fRestriction);
hashCode.Add(fAddress);
hashCode.Add(fAgency);
hashCode.Add(fCause);
hashCode.Add(fClassification);
hashCode.Add(fDate);
hashCode.Add(fPlace);
hashCode.Add(fReligiousAffilation);
hashCode.Add(fRestriction);
ProcessHashes(ref hashCode, fNotes);
ProcessHashes(ref hashCode, fSourceCitations);
ProcessHashes(ref hashCode, fMultimediaLinks);
Expand Down
8 changes: 4 additions & 4 deletions projects/GKCore/GDModel/GDMCutoutPosition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddVal(fX1);
hashCode.AddVal(fY1);
hashCode.AddVal(fX2);
hashCode.AddVal(fY2);
hashCode.Add(fX1);
hashCode.Add(fY1);
hashCode.Add(fX2);
hashCode.Add(fY2);
}
}
}
14 changes: 7 additions & 7 deletions projects/GKCore/GDModel/GDMDate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -703,13 +703,13 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddVal(fApproximated);
hashCode.AddVal(fCalendar);
hashCode.AddVal(fDay);
hashCode.AddVal(fMonth);
hashCode.AddVal(fYear);
hashCode.AddVal(fYearBC);
hashCode.AddObj(fYearModifier);
hashCode.Add(fApproximated);
hashCode.Add(fCalendar);
hashCode.Add(fDay);
hashCode.Add(fMonth);
hashCode.Add(fYear);
hashCode.Add(fYearBC);
hashCode.Add(fYearModifier);
}
}
}
2 changes: 1 addition & 1 deletion projects/GKCore/GDModel/GDMDateInterpreted.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fDatePhrase);
hashCode.Add(fDatePhrase);
}
}
}
4 changes: 2 additions & 2 deletions projects/GKCore/GDModel/GDMDatePeriod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fDateFrom);
hashCode.AddObj(fDateTo);
hashCode.Add(fDateFrom);
hashCode.Add(fDateTo);
}
}
}
4 changes: 2 additions & 2 deletions projects/GKCore/GDModel/GDMDateRange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fDateAfter);
hashCode.AddObj(fDateBefore);
hashCode.Add(fDateAfter);
hashCode.Add(fDateBefore);
}
}
}
2 changes: 1 addition & 1 deletion projects/GKCore/GDModel/GDMDateValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fValue);
hashCode.Add(fValue);
}
}
}
6 changes: 3 additions & 3 deletions projects/GKCore/GDModel/GDMFamilyRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ protected override void ProcessHashes(ref HashCode hashCode)
base.ProcessHashes(ref hashCode);

ProcessHashes(ref hashCode, fChildren);
hashCode.AddObj(fHusband);
hashCode.AddObj(fWife);
hashCode.AddVal(fStatus);
hashCode.Add(fHusband);
hashCode.Add(fWife);
hashCode.Add(fStatus);
}
}
}
4 changes: 2 additions & 2 deletions projects/GKCore/GDModel/GDMFileReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fMultimediaFormat);
hashCode.AddVal(fMediaType);
hashCode.Add(fMultimediaFormat);
hashCode.Add(fMediaType);
}
}
}
2 changes: 1 addition & 1 deletion projects/GKCore/GDModel/GDMFileReferenceWithTitle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fTitle);
hashCode.Add(fTitle);
}
}
}
2 changes: 1 addition & 1 deletion projects/GKCore/GDModel/GDMGroupRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fGroupName);
hashCode.Add(fGroupName);
ProcessHashes(ref hashCode, fMembers);
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/GKCore/GDModel/GDMIndividualRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
ProcessHashes(ref hashCode, fGroups);
ProcessHashes(ref hashCode, fPersonalNames);
ProcessHashes(ref hashCode, fSpouseToFamilyLinks);
hashCode.AddVal(fSex);
hashCode.Add(fSex);
}
}
}
2 changes: 1 addition & 1 deletion projects/GKCore/GDModel/GDMLanguage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddVal(fValue);
hashCode.Add(fValue);
}
}
}
2 changes: 1 addition & 1 deletion projects/GKCore/GDModel/GDMLines.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public override int GetHashCode()
var result = new HashCode();

for (int i = 0, num = base.Count; i < num; i++) {
result.AddObj(base[i]);
result.Add(base[i]);
}

return result.ToHashCode();
Expand Down
4 changes: 2 additions & 2 deletions projects/GKCore/GDModel/GDMLocationLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fDate);
hashCode.AddVal(fRelationship);
hashCode.Add(fDate);
hashCode.Add(fRelationship);
}
}
}
6 changes: 3 additions & 3 deletions projects/GKCore/GDModel/GDMLocationName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fAbbreviation);
hashCode.AddObj(fDate);
hashCode.AddVal(fLanguage);
hashCode.Add(fAbbreviation);
hashCode.Add(fDate);
hashCode.Add(fLanguage);
}
}
}
2 changes: 1 addition & 1 deletion projects/GKCore/GDModel/GDMLocationRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fMap);
hashCode.Add(fMap);
ProcessHashes(ref hashCode, fNames);
ProcessHashes(ref hashCode, fTopLevels);
}
Expand Down
4 changes: 2 additions & 2 deletions projects/GKCore/GDModel/GDMLocationType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fAbbreviation);
hashCode.AddObj(fDate);
hashCode.Add(fAbbreviation);
hashCode.Add(fDate);
}
}
}
4 changes: 2 additions & 2 deletions projects/GKCore/GDModel/GDMMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddVal(fLati);
hashCode.AddVal(fLong);
hashCode.Add(fLati);
hashCode.Add(fLong);
}
}
}
8 changes: 4 additions & 4 deletions projects/GKCore/GDModel/GDMMultimediaLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fCutoutPosition);
hashCode.Add(fCutoutPosition);
ProcessHashes(ref hashCode, fFileReferences);
hashCode.AddVal(fIsPrimary);
hashCode.AddVal(fIsPrimaryCutout);
hashCode.AddObj(fTitle);
hashCode.Add(fIsPrimary);
hashCode.Add(fIsPrimaryCutout);
hashCode.Add(fTitle);
}
}
}
2 changes: 1 addition & 1 deletion projects/GKCore/GDModel/GDMNoteRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fLines);
hashCode.Add(fLines);
}
}
}
4 changes: 2 additions & 2 deletions projects/GKCore/GDModel/GDMNotes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fLines);
hashCode.Add(fLines);
}
}

Expand Down Expand Up @@ -157,7 +157,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fLines);
hashCode.Add(fLines);
}
}
}
24 changes: 12 additions & 12 deletions projects/GKCore/GDModel/GDMPersonalName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -388,20 +388,20 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fGiven);
hashCode.AddVal(fLanguage);
hashCode.AddObj(fNamePrefix);
hashCode.AddObj(fNameSuffix);
hashCode.AddVal(fNameType);
hashCode.AddObj(fNickname);
hashCode.Add(fGiven);
hashCode.Add(fLanguage);
hashCode.Add(fNamePrefix);
hashCode.Add(fNameSuffix);
hashCode.Add(fNameType);
hashCode.Add(fNickname);
ProcessHashes(ref hashCode, fNotes);
ProcessHashes(ref hashCode, fSourceCitations);
hashCode.AddObj(fSurnamePrefix);
hashCode.AddObj(fSurname);
hashCode.AddObj(fPatronymicName);
hashCode.AddObj(fMarriedName);
hashCode.AddObj(fReligiousName);
hashCode.AddObj(fCensusName);
hashCode.Add(fSurnamePrefix);
hashCode.Add(fSurname);
hashCode.Add(fPatronymicName);
hashCode.Add(fMarriedName);
hashCode.Add(fReligiousName);
hashCode.Add(fCensusName);
}
}
}
6 changes: 3 additions & 3 deletions projects/GKCore/GDModel/GDMPlace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fForm);
hashCode.AddObj(fLocation);
hashCode.AddObj(fMap);
hashCode.Add(fForm);
hashCode.Add(fLocation);
hashCode.Add(fMap);
ProcessHashes(ref hashCode, fNotes);
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/GKCore/GDModel/GDMPointer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected override void ProcessHashes(ref HashCode hashCode)
{
base.ProcessHashes(ref hashCode);

hashCode.AddObj(fXRef);
hashCode.Add(fXRef);
}
}
}
Loading

0 comments on commit fd925af

Please sign in to comment.