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>
This commit is contained in:
Edward Welbourne 2023-01-10 17:20:09 +01:00
parent f5437a9d58
commit abac1e5d32

View File

@ -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: