Utils: fix narrowing warning

We test the small string capacity anyway, so we never write a larger
size.

Change-Id: Ie3a2f907898229fdee6219149917d9fddd3297e6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Marco Bubke
2022-08-18 13:21:53 +02:00
parent c7cdd55dea
commit 550dadb86e

View File

@@ -45,10 +45,12 @@ struct ControlBlock
{
using SizeType = ControlType;
constexpr ControlBlock() noexcept = default;
constexpr ControlBlock(ControlType shortStringSize, bool isReadOnlyReference, bool isReference) noexcept
: m_shortStringSize(shortStringSize),
m_isReadOnlyReference(isReadOnlyReference),
m_isReference(isReference)
constexpr ControlBlock(size_type shortStringSize,
bool isReadOnlyReference,
bool isReference) noexcept
: m_shortStringSize(static_cast<SizeType>(shortStringSize))
, m_isReadOnlyReference(isReadOnlyReference)
, m_isReference(isReference)
{}
constexpr void setShortStringSize(size_type size)