From 00780ff603293afc89e7d2ec42d6b5763ae715ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 25 Jul 2023 07:57:21 +0200 Subject: [PATCH 1/3] Add std::move to ChannelHandleMap::maybeExpand() --- src/engine/channelhandle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/channelhandle.h b/src/engine/channelhandle.h index f8d70ef033b..19a6e388a68 100644 --- a/src/engine/channelhandle.h +++ b/src/engine/channelhandle.h @@ -219,7 +219,7 @@ class ChannelHandleMap { } else { // We need to initialize simple types ourselves while (m_data.size() < iSize) { - m_data.append({}); + m_data.append(std::move(T{})); } } } From 6b99d4d63c5a5d793ce8c73ea696c3abcf89b9b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 25 Jul 2023 07:59:05 +0200 Subject: [PATCH 2/3] Don't use {} as constructor in a template context, because it reqires a copy onstructor with clang 32 --- src/engine/channelhandle.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/channelhandle.h b/src/engine/channelhandle.h index 19a6e388a68..df137b85767 100644 --- a/src/engine/channelhandle.h +++ b/src/engine/channelhandle.h @@ -160,7 +160,7 @@ class ChannelHandleMap { typedef typename QVarLengthArray::iterator iterator; ChannelHandleMap() - : m_dummy{} { + : m_dummy() { } const T& at(const ChannelHandle& handle) const { @@ -219,7 +219,7 @@ class ChannelHandleMap { } else { // We need to initialize simple types ourselves while (m_data.size() < iSize) { - m_data.append(std::move(T{})); + m_data.append(std::move(T())); } } } From 7092a7ad568ad933536f6ffe31d935eb47740edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 3 Aug 2023 00:53:18 +0200 Subject: [PATCH 3/3] remove redundant std::move() Co-authored-by: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com> --- src/engine/channelhandle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/channelhandle.h b/src/engine/channelhandle.h index df137b85767..f8450dfa6e2 100644 --- a/src/engine/channelhandle.h +++ b/src/engine/channelhandle.h @@ -219,7 +219,7 @@ class ChannelHandleMap { } else { // We need to initialize simple types ourselves while (m_data.size() < iSize) { - m_data.append(std::move(T())); + m_data.append(T()); } } }