diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-04-25 22:19:02 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-30 17:21:21 +0200 |
commit | 50ab31a5dfe491510e194e58075b648fd0b47e6a (patch) | |
tree | b3281a508a8f7da9b9f85514a3bcdb23e2f0f125 /src/corelib/tools/qlocale_p.h | |
parent | 600c538cd6001c6729d5a7dd687d2ad42bf6a7de (diff) |
QLocalePrivate: remove QLocalePrivate::m_index
It's not used anywhere, so we don't need to cache the locale data
index. We already have the pointer to the QLocaleData anyway.
This saves us a few roundtrips calculating the index from the data
pointer only to get the data pointer again.
Change-Id: I6905d20a382ddcb9fb04cc886a17499b467f905a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/corelib/tools/qlocale_p.h')
-rw-r--r-- | src/corelib/tools/qlocale_p.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h index 9674342307..9ed1b6bf76 100644 --- a/src/corelib/tools/qlocale_p.h +++ b/src/corelib/tools/qlocale_p.h @@ -208,10 +208,9 @@ public: class Q_CORE_EXPORT QLocalePrivate : public QSharedData { public: - explicit QLocalePrivate(int index, int numberOptions = 0) - : m_index(index), m_numberOptions(numberOptions) + explicit QLocalePrivate(const QLocaleData *data, int numberOptions = 0) + : m_data(data), m_numberOptions(numberOptions) { - m_data = dataPointerForIndex(index); } ~QLocalePrivate() @@ -332,9 +331,8 @@ public: QString dateTimeToString(const QString &format, const QDate *date, const QTime *time, const QLocale *q) const; - quint16 m_index; - quint16 m_numberOptions; const QLocaleData *m_data; + quint16 m_numberOptions; }; inline char QLocalePrivate::digitToCLocale(QChar in) const |