diff options
| author | João Abecasis <joao.abecasis@nokia.com> | 2011-12-16 17:22:45 +0100 |
|---|---|---|
| committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-04 23:37:58 +0100 |
| commit | 7fadc3ce322706ed6c36ad907e83fed1992b490e (patch) | |
| tree | 4f8fcd91d2459841d1af4916e438da9a9d934a89 /src/corelib/tools/qarraydata.cpp | |
| parent | 7d16ea40331dc4480af823288e6ed3ca58a677d8 (diff) | |
Get rid of assignment operators in RefCount
, and make it strictly a POD struct.
Since this operator was only being used to set the initial (owned) value
of the reference count, the name of the function introduced here to
replace it makes that use case explicit.
Change-Id: I2feadd2ac35dcb75ca211471baf5044a5f57cd62
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qarraydata.cpp')
| -rw-r--r-- | src/corelib/tools/qarraydata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp index 168249c0749..e3a6bad7c51 100644 --- a/src/corelib/tools/qarraydata.cpp +++ b/src/corelib/tools/qarraydata.cpp @@ -69,7 +69,7 @@ QArrayData *QArrayData::allocate(size_t objectSize, size_t alignment, quintptr data = (quintptr(header) + sizeof(QArrayData) + alignment - 1) & ~(alignment - 1); - header->ref = 1; + header->ref.initializeOwned(); header->size = 0; header->alloc = capacity; header->capacityReserved = reserve; |
