diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-11-12 16:57:10 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-11-17 11:47:40 +0100 |
commit | 8c1ff780180dd80bd11f7f582c4621d75d473618 (patch) | |
tree | 190da7b819124c8ef211bbfc50f6ccc779bff180 /src/corelib/tools/qarraydata.h | |
parent | 4456ebc1e33684d506f45ff3a3cb2f90b747a696 (diff) |
Only export the non inline methods of QArrayData
Change-Id: I4a66fd13ee3e6b4ceb3f5d58de4a44aa394b9e0e
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qarraydata.h')
-rw-r--r-- | src/corelib/tools/qarraydata.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h index 7c91ceee47..cbd9445d18 100644 --- a/src/corelib/tools/qarraydata.h +++ b/src/corelib/tools/qarraydata.h @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE template <class T> struct QTypedArrayData; -struct Q_CORE_EXPORT QArrayData +struct QArrayData { enum AllocationOption { Grow, @@ -71,12 +71,12 @@ struct Q_CORE_EXPORT QArrayData uint flags; qsizetype alloc; - inline qsizetype allocatedCapacity() noexcept + qsizetype allocatedCapacity() noexcept { return alloc; } - inline qsizetype constAllocatedCapacity() const noexcept + qsizetype constAllocatedCapacity() const noexcept { return alloc; } @@ -118,11 +118,11 @@ struct Q_CORE_EXPORT QArrayData #if defined(Q_CC_GNU) __attribute__((__malloc__)) #endif - static void *allocate(QArrayData **pdata, qsizetype objectSize, qsizetype alignment, + static Q_CORE_EXPORT void *allocate(QArrayData **pdata, qsizetype objectSize, qsizetype alignment, qsizetype capacity, AllocationOption option = QArrayData::KeepSize) noexcept; - [[nodiscard]] static QPair<QArrayData *, void *> reallocateUnaligned(QArrayData *data, void *dataPointer, + [[nodiscard]] static Q_CORE_EXPORT QPair<QArrayData *, void *> reallocateUnaligned(QArrayData *data, void *dataPointer, qsizetype objectSize, qsizetype newCapacity, AllocationOption option) noexcept; - static void deallocate(QArrayData *data, qsizetype objectSize, + static Q_CORE_EXPORT void deallocate(QArrayData *data, qsizetype objectSize, qsizetype alignment) noexcept; }; |