QStringBuilder: DRY: use the Concatenable typedef

Instead of repeating the full template expansion.

Task-number: QTBUG-124117
Pick-to: 6.7
Change-Id: I40526efc4e93413794c3fffd17c4f9e200733660
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
Thiago Macieira 2024-04-10 10:01:47 -07:00
parent 2e8c6d467f
commit 11f242174b

View File

@ -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) {