Use Q_FOREVER instead of forever

Public headers should compile with QT_NO_KEYWORDS defined.

Change-Id: I5620b4b2600f5e39bb402b97d14fdb257dfe9942
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Bradley T. Hughes 2012-01-18 13:44:26 +01:00 committed by Qt by Nokia
parent 1f843ca39e
commit db10b7b40f

View File

@ -159,7 +159,7 @@ template <typename BaseClass> struct QGenericAtomicOps
T fetchAndStoreRelaxed(T &_q_value, T newValue)
{
// implement fetchAndStore on top of testAndSet
forever {
Q_FOREVER {
register T tmp = load(_q_value);
if (BaseClass::testAndSetRelaxed(_q_value, tmp, newValue))
return tmp;
@ -194,7 +194,7 @@ template <typename BaseClass> struct QGenericAtomicOps
T fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd)
{
// implement fetchAndAdd on top of testAndSet
forever {
Q_FOREVER {
register T tmp = BaseClass::load(_q_value);
if (BaseClass::testAndSetRelaxed(_q_value, tmp, T(tmp + valueToAdd)))
return tmp;