Skip to content

Commit de6a317

Browse files
committed
Simplify code
1 parent 14c109e commit de6a317

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Orm/Xtensive.Orm/Core/ValueStringBuilder.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,14 @@ public void Insert(int index, string? s)
154154
Grow(count);
155155
}
156156

157-
#if NET6_0_OR_GREATE
158157
int remaining = _pos - index;
159158
_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
159+
#if NET6_0_OR_GREATE
160160
s.CopyTo(_chars.Slice(index));
161-
_pos += count;
162161
#else
163-
int remaining = _pos - index;
164-
_chars.Slice(index, remaining).CopyTo(_chars.Slice(index + count));
165162
s.AsSpan().CopyTo(_chars.Slice(index));
166-
_pos += count;
167163
#endif
164+
_pos += count;
168165
}
169166

170167
[MethodImpl(MethodImplOptions.AggressiveInlining)]

0 commit comments

Comments
 (0)