summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearray.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2012-04-03 13:23:55 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-04 23:29:52 +0200
commit4c892e14c6929e174c8bccc9ec5693a63a8ce69c (patch)
treec8e08cd6dc541fd122f395ea2c74f8733f31fc63 /src/corelib/tools/qbytearray.cpp
parenta959f34d716f42925b22d42838e7a4b97e415c69 (diff)
Introduce initializer macros for QString- and QByteArrayData
This enables easier updating of those structs, by reducing the amount of code that needs to be fixed. The common (and known) use cases are covered by the two macros being introduced in each case. Change-Id: I44981ca9b9b034f99238a11797b30bb85471cfb7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qbytearray.cpp')
-rw-r--r--src/corelib/tools/qbytearray.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 71244e0eab..5961d682c5 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -618,10 +618,8 @@ static inline char qToLower(char c)
return c;
}
-const QStaticByteArrayData<1> QByteArray::shared_null = { { Q_REFCOUNT_INITIALIZE_STATIC,
- 0, 0, 0, sizeof(QByteArrayData) }, { 0 } };
-const QStaticByteArrayData<1> QByteArray::shared_empty = { { Q_REFCOUNT_INITIALIZE_STATIC,
- 0, 0, 0, sizeof(QByteArrayData) }, { 0 } };
+const QStaticByteArrayData<1> QByteArray::shared_null = { Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER(0), { 0 } };
+const QStaticByteArrayData<1> QByteArray::shared_empty = { Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER(0), { 0 } };
/*!
\class QByteArray