Apply NRVO to QTimeZonePrivate::windowsIdToIanaIds()
Change-Id: Iba62f25a187d00b4b9ade1a4a5e063b62b653379 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
914857be08
commit
5d89dda2df
|
|
@ -685,19 +685,19 @@ QList<QByteArray> QTimeZonePrivate::windowsIdToIanaIds(const QByteArray &windows
|
|||
QList<QByteArray> QTimeZonePrivate::windowsIdToIanaIds(const QByteArray &windowsId,
|
||||
QLocale::Territory territory)
|
||||
{
|
||||
QList<QByteArray> list;
|
||||
const quint16 windowsIdKey = toWindowsIdKey(windowsId);
|
||||
const qint16 land = static_cast<quint16>(territory);
|
||||
for (const QZoneData &data : zoneDataTable) {
|
||||
// Return the region matches in preference order
|
||||
if (data.windowsIdKey == windowsIdKey && data.territory == land) {
|
||||
QList<QByteArray> list;
|
||||
for (auto l1 : data.ids())
|
||||
list << QByteArray(l1.data(), l1.size());
|
||||
return list;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return QList<QByteArray>();
|
||||
return list;
|
||||
}
|
||||
|
||||
// Define template for derived classes to reimplement so QSharedDataPointer clone() works correctly
|
||||
|
|
|
|||
Loading…
Reference in New Issue