Drop const from a declaration to let a return move
CodeChecker points out that QTimeZone::systemTimeZoneId()'s first attempt saved its result in a const QByteArray, which consequently wasn't moved from when returning. That doesn't make a huge difference for a CoW, but might as well skip the const and let the compiler do the natural thing. Change-Id: I966c9137505a8188532b164524dd4e05c0b2ac53 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
b6be97f65e
commit
0a350eaf25
@ -762,7 +762,7 @@ QTimeZone::OffsetDataList QTimeZone::transitions(const QDateTime &fromDateTime,
|
||||
|
||||
QByteArray QTimeZone::systemTimeZoneId()
|
||||
{
|
||||
const QByteArray sys = global_tz->backend->systemTimeZoneId();
|
||||
QByteArray sys = global_tz->backend->systemTimeZoneId();
|
||||
if (!sys.isEmpty())
|
||||
return sys;
|
||||
// The system zone, despite the empty ID, may know its real ID anyway:
|
||||
|
Loading…
Reference in New Issue
Block a user