QByteArrayList: micro-optimize join(QByteArray)
Null- vs. emptiness of the separator is not significant for join(), so skip the isNull() check in the conversion ctor of QByteArrayView from QByteArray by using the named conversion function that exists for this purpose instead. Pick-to: 6.3 Change-Id: I6ef07cc9bcc0bc8b87ecadc5cfaac9793cfb1b77 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
parent
31a39bd55d
commit
dd798220a0
@ -86,7 +86,7 @@ public:
|
||||
}
|
||||
Q_WEAK_OVERLOAD
|
||||
inline QByteArray join(const QByteArray &sep) const
|
||||
{ return join(QByteArrayView{sep}); }
|
||||
{ return join(qToByteArrayViewIgnoringNull(sep)); }
|
||||
inline QByteArray join(char sep) const
|
||||
{ return join({&sep, 1}); }
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user