mirror of https://github.com/qt/qtbase.git
QTzTimeZoneCache: make findEntry() static
It doesn't need access to the members, so making it static both saves the implicit this pointer, and communicates to the reader that this is function doesn't access other QTzTimeZoneCache members. In particular, it proves that it doesn't really need to be called with m_mutex locked, cf. QTBUG-122138. Task-number: QTBUG-122138 Pick-to: 6.7 6.6 6.5 Change-Id: I28c99be8d066c1647aaf7aa256b6400a6dd92955 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
4e9017c1fc
commit
7862453ba9
|
@ -783,7 +783,7 @@ public:
|
|||
QTzTimeZoneCacheEntry fetchEntry(const QByteArray &ianaId);
|
||||
|
||||
private:
|
||||
QTzTimeZoneCacheEntry findEntry(const QByteArray &ianaId);
|
||||
static QTzTimeZoneCacheEntry findEntry(const QByteArray &ianaId);
|
||||
QCache<QByteArray, QTzTimeZoneCacheEntry> m_cache;
|
||||
QMutex m_mutex;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue