QStringBuilder: DRY: use the Concatenable typedef
Instead of repeating the full template expansion. Task-number: QTBUG-124117 Change-Id: I40526efc4e93413794c3fffd17c4f9e200733660 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 11f242174b5b53a7052e9d6edc7b75aa8f8d91c4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
5edb9a6a0f
commit
ced930156c
@ -101,7 +101,7 @@ private:
|
||||
return T();
|
||||
}
|
||||
|
||||
const qsizetype len = QConcatenable< QStringBuilder<A, B> >::size(*this);
|
||||
const qsizetype len = Concatenable::size(*this);
|
||||
T s(len, Qt::Uninitialized);
|
||||
|
||||
// Using data_ptr() here (private API) so we can bypass the
|
||||
@ -110,9 +110,9 @@ private:
|
||||
// the same if len != 0.
|
||||
auto d = reinterpret_cast<typename T::iterator>(s.data_ptr().data());
|
||||
const auto start = d;
|
||||
QConcatenable<QStringBuilder<A, B>>::appendTo(*this, d);
|
||||
Concatenable::appendTo(*this, d);
|
||||
|
||||
if constexpr (QConcatenable<QStringBuilder<A, B>>::ExactSize) {
|
||||
if constexpr (Concatenable::ExactSize) {
|
||||
Q_UNUSED(start)
|
||||
} else {
|
||||
if (len != d - start) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user