Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Feb 1, 2025
1 parent 74c5701 commit 48ff651
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion JL.Core.Tests/Deconjugation/DeconjugatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void Deconjugate_わからない()
bool success = false;
foreach (Form form in result)
{
if (form.Text is expectedText && form.Process.FirstOrDefault() is expectedProcess)
if (form.Text is expectedText && form.Process.Count > 0 && form.Process[0] is expectedProcess)
{
success = true;
break;
Expand Down
3 changes: 3 additions & 0 deletions JL.Core/Dicts/CustomWordDict/CustomWordRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,7 @@ public override int GetHashCode()
return hash;
}
}

public static bool operator ==(CustomWordRecord? left, CustomWordRecord? right) => left is not null ? left.Equals(right) : right is null;
public static bool operator !=(CustomWordRecord? left, CustomWordRecord? right) => left is not null ? !left.Equals(right) : right is not null;
}
3 changes: 3 additions & 0 deletions JL.Core/Dicts/EPWING/Nazeka/EpwingNazekaRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,7 @@ public override int GetHashCode()
return hash;
}
}

public static bool operator ==(EpwingNazekaRecord? left, EpwingNazekaRecord? right) => left is not null ? left.Equals(right) : right is null;
public static bool operator !=(EpwingNazekaRecord? left, EpwingNazekaRecord? right) => left is not null ? !left.Equals(right) : right is not null;
}
3 changes: 3 additions & 0 deletions JL.Core/Dicts/EPWING/Yomichan/EpwingYomichanRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,7 @@ public override int GetHashCode()
return hash;
}
}

public static bool operator ==(EpwingYomichanRecord? left, EpwingYomichanRecord? right) => left is not null ? left.Equals(right) : right is null;
public static bool operator !=(EpwingYomichanRecord? left, EpwingYomichanRecord? right) => left is not null ? !left.Equals(right) : right is not null;
}
3 changes: 3 additions & 0 deletions JL.Core/Dicts/JMdict/JmdictRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,7 @@ public override int GetHashCode()
return Id * PrimarySpelling.GetHashCode(StringComparison.Ordinal);
}
}

public static bool operator ==(JmdictRecord? left, JmdictRecord? right) => left is not null ? left.Equals(right) : right is null;
public static bool operator !=(JmdictRecord? left, JmdictRecord? right) => left is not null ? !left.Equals(right) : right is not null;
}
3 changes: 3 additions & 0 deletions JL.Core/Dicts/JMnedict/JmnedictRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,7 @@ public override int GetHashCode()
return Id * PrimarySpelling.GetHashCode(StringComparison.Ordinal);
}
}

public static bool operator ==(JmnedictRecord? left, JmnedictRecord? right) => left is not null ? left.Equals(right) : right is null;
public static bool operator !=(JmnedictRecord? left, JmnedictRecord? right) => left is not null ? !left.Equals(right) : right is not null;
}
3 changes: 3 additions & 0 deletions JL.Core/Dicts/KanjiDict/YomichanKanjiRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,7 @@ public override int GetHashCode()
return hash;
}
}

public static bool operator ==(YomichanKanjiRecord left, YomichanKanjiRecord right) => left.Equals(right);
public static bool operator !=(YomichanKanjiRecord left, YomichanKanjiRecord right) => !left.Equals(right);
}
3 changes: 3 additions & 0 deletions JL.Core/Dicts/PitchAccent/PitchAccentRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,7 @@ public override int GetHashCode()
{
return HashCode.Combine(Spelling, Reading);
}

public static bool operator ==(PitchAccentRecord left, PitchAccentRecord right) => left.Equals(right);
public static bool operator !=(PitchAccentRecord left, PitchAccentRecord right) => !left.Equals(right);
}
3 changes: 3 additions & 0 deletions JL.Core/WordClass/JmdictWordClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,7 @@ public override int GetHashCode()
return hash;
}
}

public static bool operator ==(JmdictWordClass? left, JmdictWordClass? right) => left is not null ? left.Equals(right) : right is null;
public static bool operator !=(JmdictWordClass? left, JmdictWordClass? right) => left is not null ? !left.Equals(right) : right is not null;
}

0 comments on commit 48ff651

Please sign in to comment.