summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qtimezoneprivate_p.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2017-10-26 17:04:05 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2017-11-15 14:17:25 +0000
commitf0fc28ee301830d1d09a1a2e2cbe2adf937fb676 (patch)
treed468d28865f1322cf9b36913e00667e3a9839a70 /src/corelib/tools/qtimezoneprivate_p.h
parent10745de2795c82fa5b2d1790df67831f1ad4d192 (diff)
Replace ruleForYear() method with a local index-based function
Removed private method of QWinTimeZonePrivate in favor of a local static that returns a rule index rather than a rule; this prepares the way for smarter searching in transition-finding methods. In the process, re-work the function to use binary chop instead of a linear search through a potentially long sorted list. Change-Id: I2171e3f01afa3037b9718e1be7d0c9343aa74ff0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qtimezoneprivate_p.h')
-rw-r--r--src/corelib/tools/qtimezoneprivate_p.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/corelib/tools/qtimezoneprivate_p.h b/src/corelib/tools/qtimezoneprivate_p.h
index 592fcceeef..9b7adbbbbe 100644
--- a/src/corelib/tools/qtimezoneprivate_p.h
+++ b/src/corelib/tools/qtimezoneprivate_p.h
@@ -431,7 +431,6 @@ public:
private:
void init(const QByteArray &ianaId);
- QWinTransitionRule ruleForYear(int year) const;
QTimeZonePrivate::Data ruleToData(const QWinTransitionRule &rule, qint64 atMSecsSinceEpoch,
QTimeZone::TimeType type) const;