Change size to capacity

pull/5770/head
dataisland 2024-09-11 10:55:35 -05:00
parent e52585a16c
commit ca1e096ed5
1 changed files with 3 additions and 3 deletions

View File

@ -155,7 +155,7 @@ AI_FORCE_INLINE LineSplitter::LineSplitter(StreamReaderLE& stream, bool skip_emp
mSkip_empty_lines(skip_empty_lines),
mTrim(trim) {
mCur.reserve(1024);
mEnd = mCur.c_str() + mCur.size();
mEnd = mCur.c_str() + mCur.capacity();
operator++();
mIdx = 0;
}
@ -172,7 +172,7 @@ AI_FORCE_INLINE LineSplitter& LineSplitter::operator++() {
char s;
mCur.clear();
mEnd = mCur.c_str() + mCur.size();
mEnd = mCur.c_str() + mCur.capacity();
while (mStream.GetRemainingSize() && (s = mStream.GetI1(), 1)) {
if (s == '\n' || s == '\r') {
if (mSkip_empty_lines) {
@ -195,7 +195,7 @@ AI_FORCE_INLINE LineSplitter& LineSplitter::operator++() {
break;
}
mCur += s;
mEnd = mCur.c_str() + mCur.size();
mEnd = mCur.c_str() + mCur.capacity();
}
++mIdx;