diff options
Diffstat (limited to 'src/corelib/tools/qarraydata.h')
| -rw-r--r-- | src/corelib/tools/qarraydata.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h index da83fc1a21a..38d1091ac1f 100644 --- a/src/corelib/tools/qarraydata.h +++ b/src/corelib/tools/qarraydata.h @@ -171,11 +171,15 @@ struct QTypedArrayData return static_cast<T *>(start); } - constexpr static qsizetype max_size() noexcept + constexpr static qsizetype maxSize() noexcept { // -1 to deal with the pointer one-past-the-end return (QtPrivate::MaxAllocSize - sizeof(QtPrivate::AlignedQArrayData) - 1) / sizeof(T); } + constexpr static qsizetype max_size() noexcept + { + return maxSize(); + } }; namespace QtPrivate { |
