QByteArray::insert: do not assert that pos must be non-negative
The insert() overloads have generally a very wide contract. The very next line accepts negative positions, so remove the related assert. Change-Id: I89b67615c59287825942047a28572bf896cf30e3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
5fa016f284
commit
b1ec50c96d
@ -1911,8 +1911,6 @@ QByteArray& QByteArray::append(char ch)
|
||||
static inline QByteArray &qbytearray_insert(QByteArray *ba,
|
||||
int pos, const char *arr, int len)
|
||||
{
|
||||
Q_ASSERT(pos >= 0);
|
||||
|
||||
if (pos < 0 || len <= 0 || arr == nullptr)
|
||||
return *ba;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user