1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:47:29 +08:00

Adjust conditionals

The fact that checking the unicode title was gated behind a
`hasRomanisedTitle` guard was breaking my brain.
This commit is contained in:
Bartłomiej Dach 2024-07-03 15:50:36 +02:00
parent 32b3d3d7df
commit 5696e85b68
No known key found for this signature in database

View File

@ -37,15 +37,11 @@ namespace osu.Game.Rulesets.Edit.Checks
{
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);
}
}