mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 05:14:32 -04:00
performance: Only build strings in ruleset validation when necessary
This commit is contained in:
parent
700e24166a
commit
d62408fd31
@ -635,8 +635,8 @@ class RulesetValidator(val ruleset: Ruleset) {
|
||||
namedObj: INamed?,
|
||||
severityToReport: UniqueType.UniqueComplianceErrorSeverity
|
||||
): List<RulesetError> {
|
||||
val prefix = (if (namedObj is IRulesetObject) "${namedObj.originRuleset}: " else "") +
|
||||
(if (namedObj == null) "The" else "${namedObj.name}'s")
|
||||
val prefix by lazy { (if (namedObj is IRulesetObject) "${namedObj.originRuleset}: " else "") +
|
||||
(if (namedObj == null) "The" else "${namedObj.name}'s") }
|
||||
if (unique.type == null) return checkUntypedUnique(unique, tryFixUnknownUniques, prefix)
|
||||
|
||||
val rulesetErrors = RulesetErrorList()
|
||||
|
Loading…
x
Reference in New Issue
Block a user