diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-06-22 22:00:08 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2016-07-09 02:17:30 +0000 |
commit | cba3378732049a943e044039bde3aab1707ccca1 (patch) | |
tree | d61f3519db2689fed4f419b548c9f4c3826cd5b4 /src/corelib/thread/qthreadpool.h | |
parent | d16ba63f5cdf1e6c9dc96200bb80b2155437c4ee (diff) |
Make QDateTime's default constructor not allocate memory on 32-bit
Commit fb498a651990df5e04c75a9076da28e875c43f73 introduced the short
datetime optimization, but it accidentally removed the optimization from
Qt 5.7 that made QDateTime's default constructor not allocate memory.
Instead of bringing back the Q_GLOBAL_STATIC that was used, let's use
the short date time optimization on 32-bit too.
The CanBeSmall constant remains false on 32-bit systems, but judicious
non-use of that constant in a few functions allows 32-bit systems to use
the optimization. We still say that any date/time value is "unsmall", as
there's no sense in calculating whether the date is between 1970-01-01
and July 14 of the same year.
Change-Id: I413d458307aa46469b80fffd145a9db0325c08cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/thread/qthreadpool.h')
0 files changed, 0 insertions, 0 deletions