replaceArgEscapes(): correct a comment and assert what it relies on
Change-Id: I1d0c82b1cac0d59bd1fbda65f6a3e5be346b4c70 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
2452a7e184
commit
54abc61af1
@ -7783,9 +7783,10 @@ static QString replaceArgEscapes(QStringView s, const ArgEscapeData &d, qsizetyp
|
||||
const QChar *c = s.begin();
|
||||
const QChar *const uc_end = s.end();
|
||||
while (c != uc_end) {
|
||||
/* We don't have to check if we run off the end of the string with c,
|
||||
because as long as d.occurrences > 0 we KNOW there are valid escape
|
||||
sequences. */
|
||||
Q_ASSERT(d.occurrences > repl_cnt);
|
||||
/* We don't have to check increments of c against uc_end because, as
|
||||
long as d.occurrences > repl_cnt, we KNOW there are valid escape
|
||||
sequences remaining. */
|
||||
|
||||
const QChar *text_start = c;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user