QUrl stringprep: avoid recalculating the surrogates we already know

Change-Id: Icac4e81fff6f7f7fa4f46ec2a08105f8d3d2b403
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
bb10
Thiago Macieira 2013-06-07 18:58:11 -07:00 committed by The Qt Project
parent 736a052d93
commit 53388cd8e0
1 changed files with 2 additions and 2 deletions

View File

@ -2066,8 +2066,8 @@ Q_AUTOTEST_EXPORT void qt_nameprep(QString *source, int from)
if (uc <= 0xFFFF) {
*out++ = *in;
} else {
*out++ = QChar::highSurrogate(uc);
*out++ = QChar::lowSurrogate(uc);
*out++ = in[-1];
*out++ = in[0];
}
}
}