diff options
author | Lars Knoll <lars.knoll@qt.io> | 2019-12-03 12:21:46 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-07-06 21:30:33 +0200 |
commit | fbce2e58e6f29dc8dde5618597d53e1b1007b503 (patch) | |
tree | 836e966a69b532e140bc3d83ad846999adb75e47 /tests/auto/corelib/text/qstring/tst_qstring.cpp | |
parent | c01804bd1edf00006a76edb1bf33ba9f72a69296 (diff) |
Get rid of QArrayData::sharedNull()
Remove the last places where those got used and avoid
allocations when we resize to 0.
Change-Id: Ib553f4e7ce7cc24c31da15a55a86d18bdf1cc5c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/text/qstring/tst_qstring.cpp')
-rw-r--r-- | tests/auto/corelib/text/qstring/tst_qstring.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp index 4d2e91a694..850def64ab 100644 --- a/tests/auto/corelib/text/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp @@ -618,7 +618,7 @@ QString verifyZeroTermination(const QString &str) QString::DataPointer strDataPtr = const_cast<QString &>(str).data_ptr(); // Skip if isStatic() or fromRawData(), as those offer no guarantees - if (strDataPtr->isStatic() || !strDataPtr->isMutable()) + if (!strDataPtr->isMutable()) return str; int strSize = str.size(); |