diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2011-09-09 11:09:16 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-26 07:50:20 +0200 |
commit | cc3bf12ef69c086069835585f298fe603e632aed (patch) | |
tree | d822b1e46274abcf4d339dfcc7266c77eeb11350 /src/corelib/tools/qlist.cpp | |
parent | f8f501ec9853231805097a5dbaf0ea99196e8014 (diff) |
Make QListData::shared_null const
Similar to QMap, QVector, QByteArray and QString, keep the shared_null
in shareable memory and never modify it.
Change-Id: I2b4bb8de564080021043f6ede6c903d567c686cf
Reviewed-on: http://codereview.qt-project.org/4531
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/corelib/tools/qlist.cpp')
-rw-r--r-- | src/corelib/tools/qlist.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index 4c04385033..0daec4dbd9 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE the number of elements in the list. */ -QListData::Data QListData::shared_null = { Q_BASIC_ATOMIC_INITIALIZER(1), 0, 0, 0, true, { 0 } }; +const QListData::Data QListData::shared_null = { Q_REFCOUNT_INITIALIZER(-1), 0, 0, 0, true, { 0 } }; static int grow(int size) { |