From abac1e5d324e6e9b1255571d2bd9f0afa253c699 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 10 Jan 2023 17:20:09 +0100 Subject: [PATCH] Don't std::move a trivially-copyable QTimeZone::ShortData CodeChecker (clang-tidy) grumbles about it and it's pointless for a trivially copyable type. So make the relevant constructors simply take ShortData by value. Change-Id: I49ea180df26c6fd56591f3f21a285b1f697352dd Reviewed-by: Thiago Macieira --- src/corelib/time/qtimezone.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/time/qtimezone.h b/src/corelib/time/qtimezone.h index 4006e673e7..a880035bb5 100644 --- a/src/corelib/time/qtimezone.h +++ b/src/corelib/time/qtimezone.h @@ -56,7 +56,7 @@ class Q_CORE_EXPORT QTimeZone union Data { Data() noexcept; - Data(ShortData &&sd) : s(std::move(sd)) {} + Data(ShortData sd) : s(sd) {} Data(const Data &other) noexcept; Data(Data &&other) noexcept; Data &operator=(const Data &other) noexcept; @@ -79,7 +79,7 @@ class Q_CORE_EXPORT QTimeZone QTimeZonePrivate *d = nullptr; ShortData s; }; - QTimeZone(ShortData &&sd) : d(std::move(sd)) {} + QTimeZone(ShortData sd) : d(sd) {} public: // Sane UTC offsets range from -14 to +14 hours: