diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2013-09-18 16:21:35 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-21 01:25:19 +0200 |
commit | 129a8ce3898091c7a6a84b9b0b68fa32b7ce61bd (patch) | |
tree | 896335d7f01d8f054c0c85c6685034a50b4a41cf /qmake/generators/mac | |
parent | 9efa71ac0a0e9c5f3d52b0205eee2c015f96443f (diff) |
qatomic_cxx11: fix fetchAndAdd*()
In qatomic_cxx11, the 'Type' is std::atomic<T>, whose fetch_add method,
used in fetchAndAdd*(), already does the right thing for T* with sizeof(T) > 1.
The code, however, applied 'AddScale' to the 'valueToAdd', thus becoming
incompatible with normal pointer arithmetics.
This is very apparent when one goes to the length of actually testing
qatomic_cxx11 with tst_QAtomicPointer (which is non-trivial, since the
-c++11 configure option currently doesn't have an effect on tests/auto).
To fix, remove the AddScale factor.
Change-Id: I7507203af3b7df31d8322b31a6a1a33ca847d224
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'qmake/generators/mac')
0 files changed, 0 insertions, 0 deletions