forked from qt-creator/qt-creator
QmlDesigner: Fix 32 bit
Because std::ptrdiff_t and int are the same under 32 bit the constructor is changed to a template. The class is private so it is very unlikely that it leads to errors. Task-number: QTCREATORBUG-26910 Change-Id: I94c987b9b6d2f04876740ff283a339c0db056cfd Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christophe Giboudeaux <christophe@krop.fr> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -67,15 +67,8 @@ class StorageCache
|
||||
|
||||
StorageCacheIndex(const char *) = delete;
|
||||
|
||||
constexpr explicit StorageCacheIndex(int id) noexcept
|
||||
: id{id}
|
||||
{}
|
||||
|
||||
constexpr explicit StorageCacheIndex(std::size_t id) noexcept
|
||||
: id{static_cast<int>(id)}
|
||||
{}
|
||||
|
||||
constexpr explicit StorageCacheIndex(std::ptrdiff_t id) noexcept
|
||||
template<typename IntegerType>
|
||||
constexpr explicit StorageCacheIndex(IntegerType id) noexcept
|
||||
: id{static_cast<int>(id)}
|
||||
{}
|
||||
|
||||
|
Reference in New Issue
Block a user