summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2013-09-18 16:21:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-21 01:25:19 +0200
commit129a8ce3898091c7a6a84b9b0b68fa32b7ce61bd (patch)
tree896335d7f01d8f054c0c85c6685034a50b4a41cf /src/corelib/doc/src
parent9efa71ac0a0e9c5f3d52b0205eee2c015f96443f (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 'src/corelib/doc/src')
0 files changed, 0 insertions, 0 deletions