From af01779ef16ad42b954334fe5aa536140271b824 Mon Sep 17 00:00:00 2001 From: Nikolai Korolev Date: Fri, 15 Mar 2024 21:49:09 +0000 Subject: [PATCH] Small performance optimization. Don't do String.Trim() second time (#26161) Don't do Trim 2 times --- Content.Server/Disposal/Tube/DisposalTubeSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Disposal/Tube/DisposalTubeSystem.cs b/Content.Server/Disposal/Tube/DisposalTubeSystem.cs index b7d8455d85e..20aa8b6d2c5 100644 --- a/Content.Server/Disposal/Tube/DisposalTubeSystem.cs +++ b/Content.Server/Disposal/Tube/DisposalTubeSystem.cs @@ -122,7 +122,7 @@ private void OnUiAction(EntityUid uid, DisposalRouterComponent router, SharedDis if (trimmed == "") continue; - router.Tags.Add(tag.Trim()); + router.Tags.Add(trimmed); } _audioSystem.PlayPvs(router.ClickSound, uid, AudioParams.Default.WithVolume(-2f));