aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-28 16:42:41 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-28 16:42:41 +0100
commitca1ba482b50c41425bd0a540c7bb68406d10e552 (patch)
tree2642a71f034d70f748387038a21efda62ec9fb1e
parent080af15c8aa7cc51f97c924ba4678083b7f8da8f (diff)
downloadlibquotient-ca1ba482b50c41425bd0a540c7bb68406d10e552.tar.gz
libquotient-ca1ba482b50c41425bd0a540c7bb68406d10e552.zip
Don't std::move when the callee doesn't support it
In both fixed cases the callee accepts a const reference, which makes std::move() useless. Static analyzers apparently missed them because the cases are inside a macro.
-rw-r--r--lib/events/accountdataevents.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/events/accountdataevents.h b/lib/events/accountdataevents.h
index 7715d3b8..e5101d20 100644
--- a/lib/events/accountdataevents.h
+++ b/lib/events/accountdataevents.h
@@ -55,11 +55,11 @@ using TagsMap = QHash<QString, TagRecord>;
public: \
using content_type = _ContentType; \
DEFINE_EVENT_TYPEID(_TypeId, _Name) \
- explicit _Name(QJsonObject obj) : Event(typeId(), std::move(obj)) {} \
- explicit _Name(_ContentType content) \
+ explicit _Name(const QJsonObject& obj) : Event(typeId(), obj) {} \
+ explicit _Name(const content_type& content) \
: Event(typeId(), matrixTypeId(), \
- QJsonObject { { QStringLiteral(#_ContentKey), \
- toJson(std::move(content)) } }) \
+ QJsonObject { \
+ { QStringLiteral(#_ContentKey), toJson(content) } }) \
{} \
auto _ContentKey() const \
{ \