Skip to content

Commit

Permalink
Adjust conditionals
Browse files Browse the repository at this point in the history
The fact that checking the unicode title was gated behind a
`hasRomanisedTitle` guard was breaking my brain.
  • Loading branch information
bdach committed Jul 3, 2024
1 parent 32b3d3d commit 5696e85
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions osu.Game/Rulesets/Edit/Checks/CheckTitleMarkers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,11 @@ public IEnumerable<Issue> Run(BeatmapVerifierContext context)
{
bool hasRomanisedTitle = unicodeTitle != romanisedTitle;

if (check.AnyRegex.IsMatch(romanisedTitle) && !check.ExactRegex.IsMatch(romanisedTitle))
{
yield return new IssueTemplateIncorrectMarker(this).Create(hasRomanisedTitle ? "Romanised title" : "Title", check.CorrectMarkerFormat);
}

if (hasRomanisedTitle && check.AnyRegex.IsMatch(unicodeTitle) && !check.ExactRegex.IsMatch(unicodeTitle))
{
if (check.AnyRegex.IsMatch(unicodeTitle) && !check.ExactRegex.IsMatch(unicodeTitle))
yield return new IssueTemplateIncorrectMarker(this).Create("Title", check.CorrectMarkerFormat);
}

if (hasRomanisedTitle && check.AnyRegex.IsMatch(romanisedTitle) && !check.ExactRegex.IsMatch(romanisedTitle))
yield return new IssueTemplateIncorrectMarker(this).Create("Romanised title", check.CorrectMarkerFormat);
}
}

Expand Down

0 comments on commit 5696e85

Please sign in to comment.