/// <summary> /// Used to grow the reference array. /// /// In general this should not be used as it does not take the offset into account. /// @lucene.internal /// </summary> public void Grow(int newLength) { Debug.Assert(Offset == 0); // NOTE: senseless if offset != 0 Bytes = ArrayUtil.Grow(Bytes, newLength); }
/// <summary> /// Expand the <see cref="T:long[]"/> with the size given as a number of words (64 bit longs). </summary> public virtual void EnsureCapacityWords(int numWords) { m_bits = ArrayUtil.Grow(m_bits, numWords); m_wlen = numWords; Debug.Assert((this.numBits = Math.Max(this.numBits, numWords << 6)) >= 0); }
public override int[] Grow() { Debug.Assert(BytesStart != null); return BytesStart = ArrayUtil.Grow(BytesStart, BytesStart.Length + 1); }