refactor(opl): drop redundant Add(string) overload; OplTextBlock depends on IPropertyList

string converts implicitly to ReadOnlySpan<char>, so Add(ReadOnlySpan<char>) subsumes
Add(string); $"..." literals still bind to the interpolated-string-handler overload
(zero-alloc). OplTextBlock now holds an IPropertyList instead of the concrete
ObjectPropertyList.
This commit is contained in:
Kamron Batman 2026-06-22 10:01:39 -07:00
parent 88de585612
commit 42ae2a1146
4 changed files with 7 additions and 9 deletions

View file

@ -23,11 +23,11 @@ namespace Server;
// Use with `using var block = list.TextBlock();`. ref struct: single-threaded OPL build only.
public ref struct OplTextBlock
{
private readonly ObjectPropertyList _list;
private readonly IPropertyList _list;
internal ValueStringBuilder _builder;
private bool _any;
internal OplTextBlock(ObjectPropertyList list)
internal OplTextBlock(IPropertyList list)
{
_list = list;
_builder = ValueStringBuilder.Create();