Make QStringBuilder use memcpy for QByteArrayLiteral
There is no need to do a bytewise copy looking for the terminating nul-character when the size of the data is statically declared and known ahead of time. Change-Id: I787745a58955d1a366624f9ea92e9e701de8c981 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
a78bcea586
commit
a2abc11b51
|
|
@ -376,9 +376,8 @@ template <int N> struct QConcatenable<QStaticByteArrayDataPtr<N> > : private QAb
|
|||
#endif
|
||||
static inline void appendTo(const type &ba, char *&out)
|
||||
{
|
||||
const char *a = ba.ptr->data;
|
||||
while (*a)
|
||||
*out++ = *a++;
|
||||
::memcpy(out, ba.ptr->data, N);
|
||||
out += N;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue