summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2023-01-10 17:20:09 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2023-01-12 19:03:16 +0100
commitabac1e5d324e6e9b1255571d2bd9f0afa253c699 (patch)
treeeab37b6561cbb77dc7952921088150bcbdd6839a /src
parentf5437a9d58874d4faebf1f6815056c4d8b176bbb (diff)
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/time/qtimezone.h4
1 files 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: