forked from qt-creator/qt-creator
Utils: remove a copy from the SmallString default constructor
StringDataLayout() is now constexpr too. Not that is useful because we have to wait for constexpr new. Change-Id: I34982c8b17e1935de5c65ec6fc1b01b572170966 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -50,15 +50,11 @@ public:
|
||||
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
|
||||
using size_type = std::size_t;
|
||||
|
||||
static_assert(Size < 64
|
||||
? sizeof(Internal::StringDataLayout<Size>) == Size + 1
|
||||
: sizeof(Internal::StringDataLayout<Size>) == Size + 2,
|
||||
static_assert(Size < 64 ? sizeof(Internal::StringDataLayout<Size>) == Size + 1
|
||||
: sizeof(Internal::StringDataLayout<Size>) == Size + 2,
|
||||
"Size is wrong");
|
||||
constexpr
|
||||
BasicSmallString() noexcept
|
||||
: m_data(Internal::StringDataLayout<Size>())
|
||||
{
|
||||
}
|
||||
|
||||
constexpr BasicSmallString() = default;
|
||||
|
||||
constexpr
|
||||
BasicSmallString(const BasicSmallStringLiteral<Size> &stringReference)
|
||||
|
||||
Reference in New Issue
Block a user