From ced930156cf21b21ad593b9c3a57ef2686ae0011 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 10 Apr 2024 10:01:47 -0700 Subject: [PATCH] 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 (cherry picked from commit 11f242174b5b53a7052e9d6edc7b75aa8f8d91c4) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/text/qstringbuilder.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/text/qstringbuilder.h b/src/corelib/text/qstringbuilder.h index 258ab2f4572..1727750c4c9 100644 --- a/src/corelib/text/qstringbuilder.h +++ b/src/corelib/text/qstringbuilder.h @@ -101,7 +101,7 @@ private: return T(); } - const qsizetype len = QConcatenable< QStringBuilder >::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(s.data_ptr().data()); const auto start = d; - QConcatenable>::appendTo(*this, d); + Concatenable::appendTo(*this, d); - if constexpr (QConcatenable>::ExactSize) { + if constexpr (Concatenable::ExactSize) { Q_UNUSED(start) } else { if (len != d - start) {