From 3e0ca5db7698d59c6f2e9e7ae3a3a1654641eb4e Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 26 Dec 2021 10:38:49 +0100 Subject: EventItem::setUserData: use std::move Fixes a clang-tidy warning. --- lib/eventitem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/eventitem.h') diff --git a/lib/eventitem.h b/lib/eventitem.h index 0ab1a01d..b411a90c 100644 --- a/lib/eventitem.h +++ b/lib/eventitem.h @@ -57,7 +57,7 @@ public: } /// Store arbitrary data with the event item - void setUserData(std::any userData) { data = userData; } + void setUserData(std::any userData) { data = std::move(userData); } /// Obtain custom data previously stored with the event item const std::any& userdata() const { return data; } std::any& userData() { return data; } -- cgit v1.2.3