Skip to content

Commit a5aff40

Browse files
committed
Remove ICharSequence from OpenStringBuilder
1 parent 694689b commit a5aff40

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/Lucene.Net.Analysis.Common/Analysis/Util/OpenStringBuilder.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace Lucene.Net.Analysis.Util
4040
/// <para />
4141
/// This type also implements <see cref="ISpanAppendable"/> to allow for efficient appending of <see cref="ReadOnlySpan{T}"/>.
4242
/// </remarks>
43-
public class OpenStringBuilder : IAppendable, ISpanAppendable, ICharSequence, IBufferWriter<char>
43+
public class OpenStringBuilder : IAppendable, ISpanAppendable, IBufferWriter<char>
4444
{
4545
protected char[] m_buf;
4646
protected int m_len;
@@ -50,8 +50,6 @@ public OpenStringBuilder()
5050
{
5151
}
5252

53-
bool ICharSequence.HasValue => m_buf != null;
54-
5553
public OpenStringBuilder(int size)
5654
{
5755
// LUCENENET specific - validate argument

src/Lucene.Net.Analysis.ICU/Analysis/Icu/ICUNormalizer2CharFilter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ private int ReadFromIoNormalizeUptoBoundary()
187187

188188
while (checkedInputBoundary <= bufLen - 1)
189189
{
190-
int charLen = Character.CharCount(inputBuffer.CodePointAt(checkedInputBoundary));
190+
int charLen = Character.CharCount(inputBuffer.Array.CodePointAt(checkedInputBoundary));
191191
checkedInputBoundary += charLen;
192-
if (checkedInputBoundary < bufLen && normalizer.HasBoundaryBefore(inputBuffer
192+
if (checkedInputBoundary < bufLen && normalizer.HasBoundaryBefore(inputBuffer.Array
193193
.CodePointAt(checkedInputBoundary)))
194194
{
195195
foundBoundary = true;

0 commit comments

Comments
 (0)