mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-23 22:30:18 +07:00
performance: Only build strings in ruleset validation when necessary
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user