Remove use of 'register' from Qt.

It is deprecated and clang is starting to warn about it.

Patch mostly generated by clang itself, with some careful grep
and sed for the platform-specific parts.

Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Stephen Kelly 2013-06-15 11:49:45 +02:00 committed by The Qt Project
parent d9e722d856
commit d9fb6e6dbb
47 changed files with 375 additions and 375 deletions

View File

@ -114,7 +114,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
inline bool QBasicAtomicInt::ref()
{
register int old, tmp;
int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"addl %0,1,%1\n" /* tmp=old+1; */
@ -131,7 +131,7 @@ inline bool QBasicAtomicInt::ref()
inline bool QBasicAtomicInt::deref()
{
register int old, tmp;
int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"subl %0,1,%1\n" /* tmp=old-1; */
@ -148,7 +148,7 @@ inline bool QBasicAtomicInt::deref()
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
register int ret;
int ret;
asm volatile("1:\n"
"ldl_l %0,%1\n" /* ret=*ptr; */
"cmpeq %0,%2,%0\n"/* if (ret==expected) ret=0; else ret=1; */
@ -167,7 +167,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
register int ret;
int ret;
asm volatile("1:\n"
"ldl_l %0,%1\n" /* ret=*ptr; */
"cmpeq %0,%2,%0\n"/* if (ret==expected) ret=0; else ret=1; */
@ -187,7 +187,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
register int ret;
int ret;
asm volatile("mb\n"
"1:\n"
"ldl_l %0,%1\n" /* ret=*ptr; */
@ -207,7 +207,7 @@ inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
{
register int old, tmp;
int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@ -224,7 +224,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
{
register int old, tmp;
int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@ -242,7 +242,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
{
register int old, tmp;
int old, tmp;
asm volatile("mb\n"
"1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
@ -260,7 +260,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
{
register int old, tmp;
int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"addl %0,%3,%1\n"/* tmp=old+value; */
@ -277,7 +277,7 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
{
register int old, tmp;
int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"addl %0,%3,%1\n"/* tmp=old+value; */
@ -295,7 +295,7 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
{
register int old, tmp;
int old, tmp;
asm volatile("mb\n"
"1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
@ -314,7 +314,7 @@ inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
register void *ret;
void *ret;
asm volatile("1:\n"
"ldq_l %0,%1\n" /* ret=*ptr; */
"cmpeq %0,%2,%0\n"/* if (ret==expected) tmp=0; else tmp=1; */
@ -334,7 +334,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
{
register void *ret;
void *ret;
asm volatile("1:\n"
"ldq_l %0,%1\n" /* ret=*ptr; */
"cmpeq %0,%2,%0\n"/* if (ret==expected) tmp=0; else tmp=1; */
@ -355,7 +355,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
{
register void *ret;
void *ret;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%1\n" /* ret=*ptr; */
@ -376,7 +376,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
register T *old, *tmp;
T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@ -394,7 +394,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
register T *old, *tmp;
T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@ -413,7 +413,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
{
register T *old, *tmp;
T *old, *tmp;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
@ -432,7 +432,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
register T *old, *tmp;
T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"addq %0,%3,%1\n"/* tmp=old+value; */
@ -450,7 +450,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
{
register T *old, *tmp;
T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"addq %0,%3,%1\n"/* tmp=old+value; */
@ -469,7 +469,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
{
register T *old, *tmp;
T *old, *tmp;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */

View File

@ -114,8 +114,8 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
template<> template<typename T> inline
bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
T originalValue;
T newValue;
do {
originalValue = _q_value;
newValue = originalValue + 1;
@ -126,8 +126,8 @@ bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
T originalValue;
T newValue;
do {
originalValue = _q_value;
newValue = originalValue - 1;
@ -138,7 +138,7 @@ bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
register T originalValue;
T originalValue;
do {
originalValue = _q_value;
if (originalValue != expectedValue)
@ -165,7 +165,7 @@ template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
#if defined(__thumb__)
register T originalValue;
T originalValue;
do {
originalValue = _q_value;
} while (_q_cmpxchg(originalValue, newValue, &_q_value) != 0);
@ -184,8 +184,8 @@ T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
T originalValue;
T newValue;
do {
originalValue = _q_value;
newValue = originalValue + valueToAdd;

View File

@ -117,8 +117,8 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
template<> template<typename T> inline
bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
{
register T newValue;
register int result;
T newValue;
int result;
asm volatile("0:\n"
"ldrex %[newValue], [%[_q_value]]\n"
"add %[newValue], %[newValue], #1\n"
@ -136,8 +136,8 @@ bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
{
register T newValue;
register int result;
T newValue;
int result;
asm volatile("0:\n"
"ldrex %[newValue], [%[_q_value]]\n"
"sub %[newValue], %[newValue], #1\n"
@ -155,7 +155,7 @@ bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
register int result;
int result;
asm volatile("0:\n"
"ldrex %[result], [%[_q_value]]\n"
"eors %[result], %[result], %[expectedValue]\n"
@ -175,8 +175,8 @@ bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
register T originalValue;
register int result;
T originalValue;
int result;
asm volatile("0:\n"
"ldrex %[originalValue], [%[_q_value]]\n"
"strex %[result], %[newValue], [%[_q_value]]\n"
@ -194,9 +194,9 @@ T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
register int result;
T originalValue;
T newValue;
int result;
asm volatile("0:\n"
"ldrex %[originalValue], [%[_q_value]]\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
@ -256,8 +256,8 @@ template<> struct QAtomicIntegerTraits<char32_t> { enum { IsInteger = 1 }; };
template<> template<typename T> inline
bool QBasicAtomicOps<1>::ref(T &_q_value) Q_DECL_NOTHROW
{
register T newValue;
register int result;
T newValue;
int result;
asm volatile("0:\n"
"ldrexb %[newValue], [%[_q_value]]\n"
"add %[newValue], %[newValue], #1\n"
@ -275,8 +275,8 @@ bool QBasicAtomicOps<1>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<1>::deref(T &_q_value) Q_DECL_NOTHROW
{
register T newValue;
register int result;
T newValue;
int result;
asm volatile("0:\n"
"ldrexb %[newValue], [%[_q_value]]\n"
"sub %[newValue], %[newValue], #1\n"
@ -294,7 +294,7 @@ bool QBasicAtomicOps<1>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<1>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
register T result;
T result;
asm volatile("0:\n"
"ldrexb %[result], [%[_q_value]]\n"
"eors %[result], %[result], %[expectedValue]\n"
@ -314,8 +314,8 @@ bool QBasicAtomicOps<1>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
template<> template <typename T> inline
T QBasicAtomicOps<1>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
register T originalValue;
register int result;
T originalValue;
int result;
asm volatile("0:\n"
"ldrexb %[originalValue], [%[_q_value]]\n"
"strexb %[result], %[newValue], [%[_q_value]]\n"
@ -333,9 +333,9 @@ T QBasicAtomicOps<1>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<1>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
register int result;
T originalValue;
T newValue;
int result;
asm volatile("0:\n"
"ldrexb %[originalValue], [%[_q_value]]\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
@ -355,8 +355,8 @@ T QBasicAtomicOps<1>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy
template<> template<typename T> inline
bool QBasicAtomicOps<2>::ref(T &_q_value) Q_DECL_NOTHROW
{
register T newValue;
register int result;
T newValue;
int result;
asm volatile("0:\n"
"ldrexh %[newValue], [%[_q_value]]\n"
"add %[newValue], %[newValue], #1\n"
@ -374,8 +374,8 @@ bool QBasicAtomicOps<2>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<2>::deref(T &_q_value) Q_DECL_NOTHROW
{
register T newValue;
register int result;
T newValue;
int result;
asm volatile("0:\n"
"ldrexh %[newValue], [%[_q_value]]\n"
"sub %[newValue], %[newValue], #1\n"
@ -393,7 +393,7 @@ bool QBasicAtomicOps<2>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<2>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
register T result;
T result;
asm volatile("0:\n"
"ldrexh %[result], [%[_q_value]]\n"
"eors %[result], %[result], %[expectedValue]\n"
@ -413,8 +413,8 @@ bool QBasicAtomicOps<2>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
template<> template <typename T> inline
T QBasicAtomicOps<2>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
register T originalValue;
register int result;
T originalValue;
int result;
asm volatile("0:\n"
"ldrexh %[originalValue], [%[_q_value]]\n"
"strexh %[result], %[newValue], [%[_q_value]]\n"
@ -432,9 +432,9 @@ T QBasicAtomicOps<2>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<2>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
register int result;
T originalValue;
T newValue;
int result;
asm volatile("0:\n"
"ldrexh %[originalValue], [%[_q_value]]\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
@ -462,8 +462,8 @@ T QBasicAtomicOps<2>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy
template<> template<typename T> inline
bool QBasicAtomicOps<8>::ref(T &_q_value) Q_DECL_NOTHROW
{
register T newValue;
register int result;
T newValue;
int result;
asm volatile("0:\n"
"ldrexd %[newValue], %H[newValue], [%[_q_value]]\n"
"adds %Q[newValue], %Q[newValue], #1\n"
@ -482,8 +482,8 @@ bool QBasicAtomicOps<8>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<8>::deref(T &_q_value) Q_DECL_NOTHROW
{
register T newValue;
register int result;
T newValue;
int result;
asm volatile("0:\n"
"ldrexd %[newValue], %H[newValue], [%[_q_value]]\n"
"subs %Q[newValue], %Q[newValue], #1\n"
@ -502,7 +502,7 @@ bool QBasicAtomicOps<8>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
register T result;
T result;
asm volatile("0:\n"
"ldrexd %[result], %H[result], [%[_q_value]]\n"
"eor %[result], %[result], %[expectedValue]\n"
@ -524,8 +524,8 @@ bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
template<> template <typename T> inline
T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
register T originalValue;
register int result;
T originalValue;
int result;
asm volatile("0:\n"
"ldrexd %[originalValue], %H[originalValue], [%[_q_value]]\n"
"strexd %[result], %[newValue], %H[newValue], [%[_q_value]]\n"
@ -543,9 +543,9 @@ T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
register int result;
T originalValue;
T newValue;
int result;
asm volatile("0:\n"
"ldrexd %[originalValue], %H[originalValue], [%[_q_value]]\n"
"adds %Q[newValue], %Q[originalValue], %Q[valueToAdd]\n"
@ -588,8 +588,8 @@ T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy
inline bool QBasicAtomicInt::ref() Q_DECL_NOTHROW
{
register int newValue;
register int result;
int newValue;
int result;
retry:
__asm {
ldrex newValue, [&_q_value]
@ -603,8 +603,8 @@ inline bool QBasicAtomicInt::ref() Q_DECL_NOTHROW
inline bool QBasicAtomicInt::deref() Q_DECL_NOTHROW
{
register int newValue;
register int result;
int newValue;
int result;
retry:
__asm {
ldrex newValue, [&_q_value]
@ -618,7 +618,7 @@ inline bool QBasicAtomicInt::deref() Q_DECL_NOTHROW
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) Q_DECL_NOTHROW
{
register int result;
int result;
retry:
__asm {
ldrex result, [&_q_value]
@ -632,8 +632,8 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) Q_DECL_NOTHROW
{
register int originalValue;
register int result;
int originalValue;
int result;
retry:
__asm {
ldrex originalValue, [&_q_value]
@ -646,9 +646,9 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) Q_DECL_NOTHROW
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) Q_DECL_NOTHROW
{
register int originalValue;
register int newValue;
register int result;
int originalValue;
int newValue;
int result;
retry:
__asm {
ldrex originalValue, [&_q_value]
@ -663,7 +663,7 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) Q_DECL_NOTHROW
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue) Q_DECL_NOTHROW
{
register T *result;
T *result;
retry:
__asm {
ldrex result, [&_q_value]
@ -678,8 +678,8 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) Q_DECL_NOTHROW
{
register T *originalValue;
register int result;
T *originalValue;
int result;
retry:
__asm {
ldrex originalValue, [&_q_value]
@ -693,9 +693,9 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) Q
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd) Q_DECL_NOTHROW
{
register T *originalValue;
register T *newValue;
register int result;
T *originalValue;
T *newValue;
int result;
retry:
__asm {
ldrex originalValue, [&_q_value]

View File

@ -192,7 +192,7 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
typedef T Type;
};
inline bool _q_ia64_fetchadd_immediate(register int value)
inline bool _q_ia64_fetchadd_immediate(int value)
{
return value == 1 || value == -1
|| value == 4 || value == -4
@ -218,7 +218,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
register int expectedValueCopy = expectedValue;
int expectedValueCopy = expectedValue;
return (static_cast<int>(_InterlockedCompareExchange(&_q_value,
newValue,
expectedValueCopy))
@ -227,7 +227,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
register int expectedValueCopy = expectedValue;
int expectedValueCopy = expectedValue;
return (static_cast<int>(_InterlockedCompareExchange_acq(reinterpret_cast<volatile uint *>(&_q_value),
newValue,
expectedValueCopy))
@ -236,7 +236,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
register int expectedValueCopy = expectedValue;
int expectedValueCopy = expectedValue;
return (static_cast<int>(_InterlockedCompareExchange_rel(reinterpret_cast<volatile uint *>(&_q_value),
newValue,
expectedValueCopy))
@ -285,7 +285,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
register T *expectedValueCopy = expectedValue;
T *expectedValueCopy = expectedValue;
return (_InterlockedCompareExchangePointer(reinterpret_cast<void * volatile*>(&_q_value),
newValue,
expectedValueCopy)
@ -300,7 +300,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
volatile unsigned long *p;
};
x = &_q_value;
register T *expectedValueCopy = expectedValue;
T *expectedValueCopy = expectedValue;
return (_InterlockedCompareExchange64_acq(p, quintptr(newValue), quintptr(expectedValueCopy))
== quintptr(expectedValue));
}
@ -313,7 +313,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
volatile unsigned long *p;
};
x = &_q_value;
register T *expectedValueCopy = expectedValue;
T *expectedValueCopy = expectedValue;
return (_InterlockedCompareExchange64_rel(p, quintptr(newValue), quintptr(expectedValueCopy))
== quintptr(expectedValue));
}
@ -912,7 +912,7 @@ T QBasicAtomicOps<1>::fetchAndAddAcquire(T &_q_value, typename QAtomicAdditiveTy
{
valueToAdd *= QAtomicAdditiveType<T>::AddScale;
// implement the test-and-set loop
register T old, ret;
T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint8)old, FENCE);
@ -926,7 +926,7 @@ template<> template <typename T> inline
T QBasicAtomicOps<1>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
// implement the test-and-set loop
register T old, ret;
T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint8)old, FENCE);
@ -941,7 +941,7 @@ T QBasicAtomicOps<2>::fetchAndAddAcquire(T &_q_value, typename QAtomicAdditiveTy
{
valueToAdd *= QAtomicAdditiveType<T>::AddScale;
// implement the test-and-set loop
register T old, ret;
T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint16)old, FENCE);
@ -955,7 +955,7 @@ template<> template <typename T> inline
T QBasicAtomicOps<2>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
// implement the test-and-set loop
register T old, ret;
T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint16)old, FENCE);
@ -970,7 +970,7 @@ T QBasicAtomicOps<4>::fetchAndAddAcquire(T &_q_value, typename QAtomicAdditiveTy
{
valueToAdd *= QAtomicAdditiveType<T>::AddScale;
// implement the test-and-set loop
register T old, ret;
T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (unsigned)old, FENCE);
@ -984,7 +984,7 @@ template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
// implement the test-and-set loop
register T old, ret;
T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (unsigned)old, FENCE);
@ -999,7 +999,7 @@ T QBasicAtomicOps<8>::fetchAndAddAcquire(T &_q_value, typename QAtomicAdditiveTy
{
valueToAdd *= QAtomicAdditiveType<T>::AddScale;
// implement the test-and-set loop
register T old, ret;
T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint64)old, FENCE);
@ -1013,7 +1013,7 @@ template<> template <typename T> inline
T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
// implement the test-and-set loop
register T old, ret;
T old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint64)old, FENCE);

View File

@ -137,8 +137,8 @@ void QBasicAtomicOps<size>::orderedMemoryFence(const T &) Q_DECL_NOTHROW
template<> template<typename T> inline
bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
T originalValue;
T newValue;
asm volatile("0:\n"
"ll %[originalValue], %[_q_value]\n"
"addiu %[newValue], %[originalValue], %[one]\n"
@ -156,8 +156,8 @@ bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template<typename T> inline
bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
T originalValue;
T newValue;
asm volatile("0:\n"
"ll %[originalValue], %[_q_value]\n"
"addiu %[newValue], %[originalValue], %[minusOne]\n"
@ -175,8 +175,8 @@ bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
register T result;
register T tempValue;
T result;
T tempValue;
asm volatile("0:\n"
"ll %[result], %[_q_value]\n"
"xor %[result], %[result], %[expectedValue]\n"
@ -199,8 +199,8 @@ bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
register T originalValue;
register T tempValue;
T originalValue;
T tempValue;
asm volatile("0:\n"
"ll %[originalValue], %[_q_value]\n"
"move %[tempValue], %[newValue]\n"
@ -218,8 +218,8 @@ T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
T originalValue;
T newValue;
asm volatile("0:\n"
"ll %[originalValue], %[_q_value]\n"
"addu %[newValue], %[originalValue], %[valueToAdd]\n"
@ -254,8 +254,8 @@ template<> struct QAtomicIntegerTraits<char32_t> { enum { IsInteger = 1 }; };
template<> template<typename T> inline
bool QBasicAtomicOps<8>::ref(T &_q_value) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
T originalValue;
T newValue;
asm volatile("0:\n"
"lld %[originalValue], %[_q_value]\n"
"addiu %[newValue], %[originalValue], %[one]\n"
@ -273,8 +273,8 @@ bool QBasicAtomicOps<8>::ref(T &_q_value) Q_DECL_NOTHROW
template<> template<typename T> inline
bool QBasicAtomicOps<8>::deref(T &_q_value) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
T originalValue;
T newValue;
asm volatile("0:\n"
"lld %[originalValue], %[_q_value]\n"
"addiu %[newValue], %[originalValue], %[minusOne]\n"
@ -292,8 +292,8 @@ bool QBasicAtomicOps<8>::deref(T &_q_value) Q_DECL_NOTHROW
template<> template <typename T> inline
bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
{
register T result;
register T tempValue;
T result;
T tempValue;
asm volatile("0:\n"
"lld %[result], %[_q_value]\n"
"xor %[result], %[result], %[expectedValue]\n"
@ -316,8 +316,8 @@ bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
template<> template <typename T> inline
T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
{
register T originalValue;
register T tempValue;
T originalValue;
T tempValue;
asm volatile("0:\n"
"lld %[originalValue], %[_q_value]\n"
"move %[tempValue], %[newValue]\n"
@ -335,8 +335,8 @@ T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
template<> template <typename T> inline
T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
{
register T originalValue;
register T newValue;
T originalValue;
T newValue;
asm volatile("0:\n"
"lld %[originalValue], %[_q_value]\n"
"addu %[newValue], %[originalValue], %[valueToAdd]\n"

View File

@ -124,8 +124,8 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
inline bool QBasicAtomicInt::ref()
{
register int originalValue;
register int newValue;
int originalValue;
int newValue;
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
"addi %[newValue], %[originalValue], %[one]\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
@ -141,8 +141,8 @@ inline bool QBasicAtomicInt::ref()
inline bool QBasicAtomicInt::deref()
{
register int originalValue;
register int newValue;
int originalValue;
int newValue;
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
"addi %[newValue], %[originalValue], %[minusOne]\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
@ -158,7 +158,7 @@ inline bool QBasicAtomicInt::deref()
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
register int result;
int result;
asm volatile("lwarx %[result]," _Q_VALUE "\n"
"xor. %[result], %[result], %[expectedValue]\n"
"bne $+12\n"
@ -175,7 +175,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
register int result;
int result;
asm volatile("lwarx %[result]," _Q_VALUE "\n"
"xor. %[result], %[result], %[expectedValue]\n"
"bne $+16\n"
@ -193,7 +193,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
register int result;
int result;
asm volatile("eieio\n"
"lwarx %[result]," _Q_VALUE "\n"
"xor. %[result], %[result], %[expectedValue]\n"
@ -211,7 +211,7 @@ inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
{
register int originalValue;
int originalValue;
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
"bne- $-8\n"
@ -225,7 +225,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
{
register int originalValue;
int originalValue;
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
"bne- $-8\n"
@ -240,7 +240,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
{
register int originalValue;
int originalValue;
asm volatile("eieio\n"
"lwarx %[originalValue]," _Q_VALUE "\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
@ -255,8 +255,8 @@ inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
{
register int originalValue;
register int newValue;
int originalValue;
int newValue;
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
@ -272,8 +272,8 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
{
register int originalValue;
register int newValue;
int originalValue;
int newValue;
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
"stwcx. %[newValue]," _Q_VALUE "\n"
@ -290,8 +290,8 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
{
register int originalValue;
register int newValue;
int originalValue;
int newValue;
asm volatile("eieio\n"
"lwarx %[originalValue]," _Q_VALUE "\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
@ -317,7 +317,7 @@ inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
register void *result;
void *result;
asm volatile(LPARX" %[result]," _Q_VALUE "\n"
"xor. %[result], %[result], %[expectedValue]\n"
"bne $+12\n"
@ -335,7 +335,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
{
register void *result;
void *result;
asm volatile(LPARX" %[result]," _Q_VALUE "\n"
"xor. %[result], %[result], %[expectedValue]\n"
"bne $+16\n"
@ -354,7 +354,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
{
register void *result;
void *result;
asm volatile("eieio\n"
LPARX" %[result]," _Q_VALUE "\n"
"xor. %[result], %[result], %[expectedValue]\n"
@ -373,7 +373,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
register T *originalValue;
T *originalValue;
asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
STPCX" %[newValue]," _Q_VALUE "\n"
"bne- $-8\n"
@ -388,7 +388,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
register T *originalValue;
T *originalValue;
asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
STPCX" %[newValue]," _Q_VALUE "\n"
"bne- $-8\n"
@ -404,7 +404,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
{
register T *originalValue;
T *originalValue;
asm volatile("eieio\n"
LPARX" %[originalValue]," _Q_VALUE "\n"
STPCX" %[newValue]," _Q_VALUE "\n"
@ -420,8 +420,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
register T *originalValue;
register T *newValue;
T *originalValue;
T *newValue;
asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
STPCX" %[newValue]," _Q_VALUE "\n"
@ -438,8 +438,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
{
register T *originalValue;
register T *newValue;
T *originalValue;
T *newValue;
asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"
STPCX" %[newValue]," _Q_VALUE "\n"
@ -457,8 +457,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
{
register T *originalValue;
register T *newValue;
T *originalValue;
T *newValue;
asm volatile("eieio\n"
LPARX" %[originalValue]," _Q_VALUE "\n"
"add %[newValue], %[originalValue], %[valueToAdd]\n"

View File

@ -147,7 +147,7 @@ inline bool QBasicAtomicInt::deref()
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
register int result;
int result;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"xor %[expectedValue], r0\n"
@ -169,7 +169,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
register int result;
int result;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"xor %[expectedValue], r0\n"
@ -192,7 +192,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
register int result;
int result;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@ -220,7 +220,7 @@ inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
{
register int originalValue;
int originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@ -237,7 +237,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
{
register int originalValue;
int originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@ -255,7 +255,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
{
register int originalValue;
int originalValue;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@ -278,7 +278,7 @@ inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
{
register int originalValue;
int originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@ -295,7 +295,7 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
{
register int originalValue;
int originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@ -313,7 +313,7 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
{
register int originalValue;
int originalValue;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@ -337,7 +337,7 @@ inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
register T *result;
T *result;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"xor %[expectedValue], r0\n"
@ -360,7 +360,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
{
register T *result;
T *result;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"xor %[expectedValue], r0\n"
@ -384,7 +384,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
{
register T *result;
T *result;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@ -414,7 +414,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
register T *originalValue;
T *originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@ -432,7 +432,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
register T *originalValue;
T *originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@ -451,7 +451,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
{
register T *originalValue;
T *originalValue;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@ -476,7 +476,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
register T *originalValue;
T *originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@ -494,7 +494,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
{
register T *originalValue;
T *originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@ -513,7 +513,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
{
register T *originalValue;
T *originalValue;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"

View File

@ -99,9 +99,9 @@ Q_GLOBAL_STATIC_WITH_ARGS(QMutex, textCodecsMutex, (QMutex::Recursive));
QMutex *qTextCodecsMutex() { return textCodecsMutex(); }
#if !defined(QT_USE_ICU)
static char qtolower(register char c)
static char qtolower(char c)
{ if (c >= 'A' && c <= 'Z') return c + 0x20; return c; }
static bool qisalnum(register char c)
static bool qisalnum(char c)
{ return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); }
bool qTextCodecNameMatch(const char *n, const char *h)

View File

@ -501,7 +501,7 @@ Q_AUTOTEST_EXPORT QByteArray qCleanupFuncinfo(QByteArray info)
templatecount = 1;
--pos;
while (pos && templatecount) {
register char c = info.at(pos);
char c = info.at(pos);
if (c == '>')
++templatecount;
else if (c == '<')

View File

@ -220,7 +220,7 @@ QT_BEGIN_NAMESPACE
QInotifyFileSystemWatcherEngine *QInotifyFileSystemWatcherEngine::create(QObject *parent)
{
register int fd = -1;
int fd = -1;
#ifdef IN_CLOEXEC
fd = inotify_init1(IN_CLOEXEC);
#endif

View File

@ -882,7 +882,7 @@ inline bool QUrlPrivate::setScheme(const QString &value, int len, bool doSetErro
// schemes are ASCII only, so we don't need the full Unicode toLower
QChar *schemeData = scheme.data(); // force detaching here
for (int i = needsLowercasing; i >= 0; --i) {
register ushort c = schemeData[i].unicode();
ushort c = schemeData[i].unicode();
if (c >= 'A' && c <= 'Z')
schemeData[i] = c + 0x20;
}
@ -1244,7 +1244,7 @@ inline void QUrlPrivate::parse(const QString &url, QUrl::ParsingMode parsingMode
const ushort *const data = reinterpret_cast<const ushort *>(begin);
for (int i = 0; i < len; ++i) {
register uint uc = data[i];
uint uc = data[i];
if (uc == '#' && hash == -1) {
hash = i;
@ -1472,7 +1472,7 @@ inline QUrlPrivate::ErrorCode QUrlPrivate::validityError(QString *source, int *p
// check for a path of "text:text/"
for (int i = 0; i < path.length(); ++i) {
register ushort c = path.at(i).unicode();
ushort c = path.at(i).unicode();
if (c == '/') {
// found the slash before the colon
return NoError;
@ -1512,7 +1512,7 @@ bool QUrlPrivate::validateComponent(QUrlPrivate::Section section, const QString
const ushort *const data = reinterpret_cast<const ushort *>(input.constData());
for (uint i = uint(begin); i < uint(end); ++i) {
register uint uc = data[i];
uint uc = data[i];
if (uc >= 0x80)
continue;

View File

@ -2028,7 +2028,7 @@ Q_AUTOTEST_EXPORT void qt_nameprep(QString *source, int from)
const QChar *e = src + source->size();
for ( ; out < e; ++out) {
register ushort uc = out->unicode();
ushort uc = out->unicode();
if (uc >= 0x80) {
break;
} else if (uc >= 'A' && uc <= 'Z') {
@ -2121,7 +2121,7 @@ Q_AUTOTEST_EXPORT bool qt_check_std3rules(const QChar *uc, int len)
return false;
for (int i = 0; i < len; ++i) {
register ushort c = uc[i].unicode();
ushort c = uc[i].unicode();
if (c == '-' && (i == 0 || i == len - 1))
return false;
@ -2504,7 +2504,7 @@ QString qt_ACE_do(const QString &domain, AceOperation op)
const QChar *in = domain.constData() + lastIdx;
const QChar *e = in + labelLength;
for (; in < e; ++in, ++out) {
register ushort uc = in->unicode();
ushort uc = in->unicode();
if (uc > 0x7f)
simple = false;
if (uc >= 'A' && uc <= 'Z')
@ -2533,7 +2533,7 @@ QString qt_ACE_do(const QString &domain, AceOperation op)
// That means we need one or two temporaries
qt_nameprep(&result, prevLen);
labelLength = result.length() - prevLen;
register int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
aceForm.resize(0);
if (toReserve > aceForm.capacity())
aceForm.reserve(toReserve);

View File

@ -464,7 +464,7 @@ static int recode(QString &result, const ushort *begin, const ushort *end, QUrl:
ushort *output = 0;
for ( ; input != end; ++input) {
register ushort c;
ushort c;
EncodingAction action;
// try a run where no change is necessary
@ -483,7 +483,7 @@ static int recode(QString &result, const ushort *begin, const ushort *end, QUrl:
break;
non_trivial:
register uint decoded;
uint decoded;
if (c == '%' && retryBadEncoding) {
// always write "%25"
ensureDetached(result, output, begin, input, end);

View File

@ -79,7 +79,7 @@ int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
{
if (!orig_timeout) {
// no timeout -> block forever
register int ret;
int ret;
EINTR_LOOP(ret, select(nfds, fdread, fdwrite, fdexcept, 0));
return ret;
}

View File

@ -168,7 +168,7 @@ static inline int qt_safe_open(const char *pathname, int flags, mode_t mode = 07
#ifdef O_CLOEXEC
flags |= O_CLOEXEC;
#endif
register int fd;
int fd;
EINTR_LOOP(fd, QT_OPEN(pathname, flags, mode));
// unknown flags are ignored, so we have no way of verifying if
@ -191,7 +191,7 @@ static inline int qt_safe_pipe(int pipefd[2], int flags = 0)
Q_ASSERT((flags & ~O_NONBLOCK) == 0);
#endif
register int ret;
int ret;
#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC && defined(O_CLOEXEC)
// use pipe2
flags |= O_CLOEXEC;
@ -223,7 +223,7 @@ static inline int qt_safe_dup(int oldfd, int atleast = 0, int flags = FD_CLOEXEC
{
Q_ASSERT(flags == FD_CLOEXEC || flags == 0);
register int ret;
int ret;
#ifdef F_DUPFD_CLOEXEC
// use this fcntl
if (flags & FD_CLOEXEC) {
@ -247,7 +247,7 @@ static inline int qt_safe_dup2(int oldfd, int newfd, int flags = FD_CLOEXEC)
{
Q_ASSERT(flags == FD_CLOEXEC || flags == 0);
register int ret;
int ret;
#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC && defined(O_CLOEXEC)
// use dup3
if (flags & FD_CLOEXEC) {
@ -291,7 +291,7 @@ static inline qint64 qt_safe_write_nosignal(int fd, const void *data, qint64 len
static inline int qt_safe_close(int fd)
{
register int ret;
int ret;
EINTR_LOOP(ret, QT_CLOSE(fd));
return ret;
}
@ -303,28 +303,28 @@ static inline int qt_safe_close(int fd)
static inline int qt_safe_execve(const char *filename, char *const argv[],
char *const envp[])
{
register int ret;
int ret;
EINTR_LOOP(ret, ::execve(filename, argv, envp));
return ret;
}
static inline int qt_safe_execv(const char *path, char *const argv[])
{
register int ret;
int ret;
EINTR_LOOP(ret, ::execv(path, argv));
return ret;
}
static inline int qt_safe_execvp(const char *file, char *const argv[])
{
register int ret;
int ret;
EINTR_LOOP(ret, ::execvp(file, argv));
return ret;
}
static inline pid_t qt_safe_waitpid(pid_t pid, int *status, int options)
{
register int ret;
int ret;
EINTR_LOOP(ret, ::waitpid(pid, status, options));
return ret;
}

View File

@ -938,7 +938,7 @@ bool QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject *receiv
if (receiver->d_func()->threadData == this->threadData && extraData) {
// application event filters are only called for objects in the GUI thread
for (int i = 0; i < extraData->eventFilters.size(); ++i) {
register QObject *obj = extraData->eventFilters.at(i);
QObject *obj = extraData->eventFilters.at(i);
if (!obj)
continue;
if (obj->d_func()->threadData != threadData) {
@ -957,7 +957,7 @@ bool QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject *receiver, Q
Q_Q(QCoreApplication);
if (receiver != q && receiver->d_func()->extraData) {
for (int i = 0; i < receiver->d_func()->extraData->eventFilters.size(); ++i) {
register QObject *obj = receiver->d_func()->extraData->eventFilters.at(i);
QObject *obj = receiver->d_func()->extraData->eventFilters.at(i);
if (!obj)
continue;
if (obj->d_func()->threadData != receiver->d_func()->threadData) {

View File

@ -686,7 +686,7 @@ struct QMetaTypeIdQObject<T*, /* isPointerToTypeDerivedFromQObject */ true>
template <typename T>
inline int qRegisterMetaTypeStreamOperators()
{
register int id = qMetaTypeId<T>();
int id = qMetaTypeId<T>();
QMetaType::registerStreamOperators(id, QtMetaTypePrivate::QMetaTypeFunctionHelper<T>::Save,
QtMetaTypePrivate::QMetaTypeFunctionHelper<T>::Load);
return id;

View File

@ -212,7 +212,7 @@ bool QSystemSemaphorePrivate::modifySemaphore(int count)
operation.sem_op = count;
operation.sem_flg = SEM_UNDO;
register int res;
int res;
EINTR_LOOP(res, semop(semaphore, &operation, 1));
if (-1 == res) {
// If the semaphore was removed be nice and create it and then modifySemaphore again

View File

@ -153,7 +153,7 @@ void QTimerInfoList::timerRepair(const timespec &diff)
{
// repair all timers
for (int i = 0; i < size(); ++i) {
register QTimerInfo *t = at(i);
QTimerInfo *t = at(i);
t->timeout = t->timeout + diff;
}
}
@ -182,7 +182,7 @@ void QTimerInfoList::timerInsert(QTimerInfo *ti)
{
int index = size();
while (index--) {
register const QTimerInfo * const t = at(index);
const QTimerInfo * const t = at(index);
if (!(ti->timeout < t->timeout))
break;
}
@ -244,8 +244,8 @@ static void calculateCoarseTimerTimeout(QTimerInfo *t, timespec currentTime)
//
// The objective is to make most timers wake up at the same time, thereby reducing CPU wakeups.
register uint interval = uint(t->interval);
register uint msec = uint(t->timeout.tv_nsec) / 1000 / 1000;
uint interval = uint(t->interval);
uint msec = uint(t->timeout.tv_nsec) / 1000 / 1000;
Q_ASSERT(interval >= 20);
// Calculate how much we can round and still keep within 5% error
@ -256,14 +256,14 @@ static void calculateCoarseTimerTimeout(QTimerInfo *t, timespec currentTime)
if (interval < 50) {
// round to even
// round towards multiples of 50 ms
register bool roundUp = (msec % 50) >= 25;
bool roundUp = (msec % 50) >= 25;
msec >>= 1;
msec |= uint(roundUp);
msec <<= 1;
} else {
// round to multiple of 4
// round towards multiples of 100 ms
register bool roundUp = (msec % 100) >= 50;
bool roundUp = (msec % 100) >= 50;
msec >>= 2;
msec |= uint(roundUp);
msec <<= 2;
@ -423,7 +423,7 @@ int QTimerInfoList::timerRemainingTime(int timerId)
timespec tm = {0, 0};
for (int i = 0; i < count(); ++i) {
register QTimerInfo *t = at(i);
QTimerInfo *t = at(i);
if (t->id == timerId) {
if (currentTime < t->timeout) {
// time to wait
@ -509,7 +509,7 @@ bool QTimerInfoList::unregisterTimer(int timerId)
{
// set timer inactive
for (int i = 0; i < count(); ++i) {
register QTimerInfo *t = at(i);
QTimerInfo *t = at(i);
if (t->id == timerId) {
// found it
removeAt(i);
@ -530,7 +530,7 @@ bool QTimerInfoList::unregisterTimers(QObject *object)
if (isEmpty())
return false;
for (int i = 0; i < count(); ++i) {
register QTimerInfo *t = at(i);
QTimerInfo *t = at(i);
if (t->obj == object) {
// object found
removeAt(i);
@ -550,7 +550,7 @@ QList<QAbstractEventDispatcher::TimerInfo> QTimerInfoList::registeredTimers(QObj
{
QList<QAbstractEventDispatcher::TimerInfo> list;
for (int i = 0; i < count(); ++i) {
register const QTimerInfo * const t = at(i);
const QTimerInfo * const t = at(i);
if (t->obj == object) {
list << QAbstractEventDispatcher::TimerInfo(t->id,
(t->timerType == Qt::VeryCoarseTimer

View File

@ -172,7 +172,7 @@ template <typename BaseClass> struct QGenericAtomicOps
{
// implement fetchAndStore on top of testAndSet
Q_FOREVER {
register T tmp = load(_q_value);
T tmp = load(_q_value);
if (BaseClass::testAndSetRelaxed(_q_value, tmp, newValue))
return tmp;
}
@ -207,7 +207,7 @@ template <typename BaseClass> struct QGenericAtomicOps
{
// implement fetchAndAdd on top of testAndSet
Q_FOREVER {
register T tmp = BaseClass::load(_q_value);
T tmp = BaseClass::load(_q_value);
if (BaseClass::testAndSetRelaxed(_q_value, tmp, T(tmp + valueToAdd)))
return tmp;
}

View File

@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
static inline bool isRecursive(QMutexData *d)
{
register quintptr u = quintptr(d);
quintptr u = quintptr(d);
if (Q_LIKELY(u <= 0x3))
return false;
#ifdef QT_LINUX_FUTEX

View File

@ -261,8 +261,8 @@ int qstrcmp(const char *str1, const char *str2)
int qstricmp(const char *str1, const char *str2)
{
register const uchar *s1 = reinterpret_cast<const uchar *>(str1);
register const uchar *s2 = reinterpret_cast<const uchar *>(str2);
const uchar *s1 = reinterpret_cast<const uchar *>(str1);
const uchar *s2 = reinterpret_cast<const uchar *>(str2);
int res;
uchar c;
if (!s1 || !s2)
@ -295,8 +295,8 @@ int qstricmp(const char *str1, const char *str2)
int qstrnicmp(const char *str1, const char *str2, uint len)
{
register const uchar *s1 = reinterpret_cast<const uchar *>(str1);
register const uchar *s2 = reinterpret_cast<const uchar *>(str2);
const uchar *s1 = reinterpret_cast<const uchar *>(str1);
const uchar *s2 = reinterpret_cast<const uchar *>(str2);
int res;
uchar c;
if (!s1 || !s2)
@ -321,7 +321,7 @@ int qstrcmp(const QByteArray &str1, const char *str2)
const char *str1data = str1.constData();
const char *str1end = str1data + str1.length();
for ( ; str1data < str1end && *str2; ++str1data, ++str2) {
register int diff = int(uchar(*str1data)) - uchar(*str2);
int diff = int(uchar(*str1data)) - uchar(*str2);
if (diff)
// found a difference
return diff;
@ -357,8 +357,8 @@ int qstrcmp(const QByteArray &str1, const QByteArray &str2)
#if 0
static void createCRC16Table() // build CRC16 lookup table
{
register unsigned int i;
register unsigned int j;
unsigned int i;
unsigned int j;
unsigned short crc_tbl[16];
unsigned int v0, v1, v2, v3;
for (i = 0; i < 16; i++) {
@ -410,7 +410,7 @@ static const quint16 crc_tbl[16] = {
quint16 qChecksum(const char *data, uint len)
{
register quint16 crc = 0xffff;
quint16 crc = 0xffff;
uchar c;
const uchar *p = reinterpret_cast<const uchar *>(data);
while (len--) {
@ -2671,7 +2671,7 @@ QByteArray QByteArray::mid(int pos, int len) const
QByteArray QByteArray::toLower() const
{
QByteArray s(*this);
register uchar *p = reinterpret_cast<uchar *>(s.data());
uchar *p = reinterpret_cast<uchar *>(s.data());
if (p) {
while (*p) {
*p = QChar::toLower((ushort)*p);
@ -2694,7 +2694,7 @@ QByteArray QByteArray::toLower() const
QByteArray QByteArray::toUpper() const
{
QByteArray s(*this);
register uchar *p = reinterpret_cast<uchar *>(s.data());
uchar *p = reinterpret_cast<uchar *>(s.data());
if (p) {
while (*p) {
*p = QChar::toUpper((ushort)*p);

View File

@ -61,7 +61,7 @@ static inline int bm_find(const uchar *cc, int l, int index, const uchar *puc, u
return index > l ? -1 : index;
const uint pl_minus_one = pl - 1;
register const uchar *current = cc + index + pl_minus_one;
const uchar *current = cc + index + pl_minus_one;
const uchar *end = cc + l;
while (current < end) {
uint skip = skiptable[*current];

View File

@ -300,13 +300,13 @@ bool removeGroupSeparators(QLocalePrivate::CharBuff *num)
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
qulonglong qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok)
qulonglong qstrtoull(const char *nptr, const char **endptr, int base, bool *ok)
{
register const char *s = nptr;
register qulonglong acc;
register unsigned char c;
register qulonglong qbase, cutoff;
register int any, cutlim;
const char *s = nptr;
qulonglong acc;
unsigned char c;
qulonglong qbase, cutoff;
int any, cutlim;
if (ok != 0)
*ok = true;
@ -381,13 +381,13 @@ qulonglong qstrtoull(const char *nptr, const char **endptr, register int base, b
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
qlonglong qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok)
qlonglong qstrtoll(const char *nptr, const char **endptr, int base, bool *ok)
{
register const char *s;
register qulonglong acc;
register unsigned char c;
register qulonglong qbase, cutoff;
register int neg, any, cutlim;
const char *s;
qulonglong acc;
unsigned char c;
qulonglong qbase, cutoff;
int neg, any, cutlim;
/*
* Skip white space and pick up leading +/- sign if any.

View File

@ -110,8 +110,8 @@ bool removeGroupSeparators(QLocalePrivate::CharBuff *num);
Q_CORE_EXPORT char *qdtoa(double d, int mode, int ndigits, int *decpt,
int *sign, char **rve, char **digits_str);
Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok);
qlonglong qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok);
qulonglong qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok);
qlonglong qstrtoll(const char *nptr, const char **endptr, int base, bool *ok);
qulonglong qstrtoull(const char *nptr, const char **endptr, int base, bool *ok);
QT_END_NAMESPACE

View File

@ -506,7 +506,7 @@ public:
if (o) {
// increase the strongref, but never up from zero
// or less (-1 is used by QWeakPointer on untracked QObject)
register int tmp = o->strongref.load();
int tmp = o->strongref.load();
while (tmp > 0) {
// try to increment from "tmp" to "tmp + 1"
if (o->strongref.testAndSetRelaxed(tmp, tmp + 1))
@ -801,7 +801,7 @@ namespace QtSharedPointer {
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerCast(const QSharedPointer<T> &src)
{
register X *ptr = static_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
X *ptr = static_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
return QtSharedPointer::copyAndSetPointer(ptr, src);
}
template <class X, class T>
@ -813,7 +813,7 @@ Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerCast(const QWeakPointer<T> &sr
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerDynamicCast(const QSharedPointer<T> &src)
{
register X *ptr = dynamic_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
X *ptr = dynamic_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
if (!ptr)
return QSharedPointer<X>();
return QtSharedPointer::copyAndSetPointer(ptr, src);
@ -827,7 +827,7 @@ Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerDynamicCast(const QWeakPointer
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerConstCast(const QSharedPointer<T> &src)
{
register X *ptr = const_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
X *ptr = const_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
return QtSharedPointer::copyAndSetPointer(ptr, src);
}
template <class X, class T>
@ -847,7 +847,7 @@ QWeakPointer<X> qWeakPointerCast(const QSharedPointer<T> &src)
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerObjectCast(const QSharedPointer<T> &src)
{
register X *ptr = qobject_cast<X *>(src.data());
X *ptr = qobject_cast<X *>(src.data());
return QtSharedPointer::copyAndSetPointer(ptr, src);
}
template <class X, class T>

View File

@ -266,7 +266,7 @@ static bool qMemEquals(const quint16 *a, const quint16 *b, int length)
if (a == b || !length)
return true;
register union {
union {
const quint16 *w;
const quint32 *d;
quintptr value;
@ -291,7 +291,7 @@ static bool qMemEquals(const quint16 *a, const quint16 *b, int length)
// both addresses are 4-bytes aligned
// do a fast 32-bit comparison
register const quint32 *e = sa.d + (length >> 1);
const quint32 *e = sa.d + (length >> 1);
for ( ; sa.d != e; ++sa.d, ++sb.d) {
if (*sa.d != *sb.d)
return false;
@ -301,7 +301,7 @@ static bool qMemEquals(const quint16 *a, const quint16 *b, int length)
return (length & 1) ? *sa.w == *sb.w : true;
} else {
// one of the addresses isn't 4-byte aligned but the other is
register const quint16 *e = sa.w + length;
const quint16 *e = sa.w + length;
for ( ; sa.w != e; ++sa.w, ++sb.w) {
if (*sa.w != *sb.w)
return false;
@ -4908,8 +4908,8 @@ int QString::compare_helper(const QChar *data1, int length1, const QChar *data2,
{
if (cs == Qt::CaseSensitive)
return ucstrcmp(data1, length1, data2, length2);
register const ushort *s1 = reinterpret_cast<const ushort *>(data1);
register const ushort *s2 = reinterpret_cast<const ushort *>(data2);
const ushort *s1 = reinterpret_cast<const ushort *>(data1);
const ushort *s2 = reinterpret_cast<const ushort *>(data2);
return ucstricmp(s1, s1 + length1, s2, s2 + length2);
}

View File

@ -69,7 +69,7 @@ static inline int bm_find(const ushort *uc, uint l, int index, const ushort *puc
return index > (int)l ? -1 : index;
const uint pl_minus_one = pl - 1;
register const ushort *current = uc + index + pl_minus_one;
const ushort *current = uc + index + pl_minus_one;
const ushort *end = uc + l;
if (cs == Qt::CaseSensitive) {
while (current < end) {

View File

@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
static inline bool isValidCharacterNoDash(QChar c)
{
register ushort u = c.unicode();
ushort u = c.unicode();
return (u >= 'a' && u <= 'z')
|| (u >= 'A' && u <= 'Z')
|| (u >= '0' && u <= '9')
@ -63,7 +63,7 @@ static inline bool isValidCharacterNoDash(QChar c)
static inline bool isValidCharacter(QChar c)
{
register ushort u = c.unicode();
ushort u = c.unicode();
return (u >= 'a' && u <= 'z')
|| (u >= 'A' && u <= 'Z')
|| (u >= '0' && u <= '9')
@ -72,7 +72,7 @@ static inline bool isValidCharacter(QChar c)
static inline bool isValidNumber(QChar c)
{
register ushort u = c.unicode();
ushort u = c.unicode();
return (u >= '0' && u <= '9');
}
@ -259,7 +259,7 @@ static bool isFixedType(int c)
// returns NULL if it isn't valid.
static const char *validateSingleType(const char *signature)
{
register char c = *signature;
char c = *signature;
if (c == DBUS_TYPE_INVALID)
return 0;

View File

@ -53,7 +53,7 @@ static void swapPixel01(QImage *image) // 1-bpp: swap 0 and 1 pixels
{
int i;
if (image->depth() == 1 && image->colorCount() == 2) {
register uint *p = (uint *)image->bits();
uint *p = (uint *)image->bits();
int nbytes = image->byteCount();
for (i=0; i<nbytes/4; i++) {
*p = ~*p;
@ -368,7 +368,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
if (comp == BMP_RLE4) { // run length compression
int x=0, y=0, c, i;
quint8 b;
register uchar *p = data + (h-1)*bpl;
uchar *p = data + (h-1)*bpl;
const uchar *endp = p + w;
while (y < h) {
if (!d->getChar((char *)&b))
@ -440,7 +440,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
while (--h >= 0) {
if (d->read((char*)buf,buflen) != buflen)
break;
register uchar *p = data + h*bpl;
uchar *p = data + h*bpl;
uchar *b = buf;
for (int i=0; i<w/2; i++) { // convert nibbles to bytes
*p++ = *b >> 4;
@ -457,7 +457,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
if (comp == BMP_RLE8) { // run length compression
int x=0, y=0;
quint8 b;
register uchar *p = data + (h-1)*bpl;
uchar *p = data + (h-1)*bpl;
const uchar *endp = p + w;
while (y < h) {
if (!d->getChar((char *)&b))
@ -520,7 +520,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
}
else if (nbits == 16 || nbits == 24 || nbits == 32) { // 16,24,32 bit BMP image
register QRgb *p;
QRgb *p;
QRgb *end;
uchar *buf24 = new uchar[bpl];
int bpl24 = ((w*nbits+31)/32)*4;
@ -632,7 +632,7 @@ bool qt_write_dib(QDataStream &s, QImage image)
uchar *buf = new uchar[bpl_bmp];
uchar *b, *end;
register const uchar *p;
const uchar *p;
memset(buf, 0, bpl_bmp);
for (y=image.height()-1; y>=0; y--) { // write the image bits

View File

@ -2270,7 +2270,7 @@ static void dither_to_Mono(QImageData *dst, const QImageData *src,
int *b1, *b2;
int wbytes = w * (d/8);
register const uchar *p = src->data;
const uchar *p = src->data;
const uchar *end = p + wbytes;
b2 = line2;
if (use_gray) { // 8 bit image
@ -2830,7 +2830,7 @@ static void convert_Mono_to_X32(QImageData *dest, const QImageData *src, Qt::Ima
uchar *dest_data = dest->data;
if (src->format == QImage::Format_Mono) {
for (int y = 0; y < dest->height; y++) {
register uint *p = (uint *)dest_data;
uint *p = (uint *)dest_data;
for (int x = 0; x < dest->width; x++)
*p++ = colorTable.at((src_data[x>>3] >> (7 - (x & 7))) & 1);
@ -2839,7 +2839,7 @@ static void convert_Mono_to_X32(QImageData *dest, const QImageData *src, Qt::Ima
}
} else {
for (int y = 0; y < dest->height; y++) {
register uint *p = (uint *)dest_data;
uint *p = (uint *)dest_data;
for (int x = 0; x < dest->width; x++)
*p++ = colorTable.at((src_data[x>>3] >> (x & 7)) & 1);
@ -2873,7 +2873,7 @@ static void convert_Mono_to_Indexed8(QImageData *dest, const QImageData *src, Qt
uchar *dest_data = dest->data;
if (src->format == QImage::Format_Mono) {
for (int y = 0; y < dest->height; y++) {
register uchar *p = dest_data;
uchar *p = dest_data;
for (int x = 0; x < dest->width; x++)
*p++ = (src_data[x>>3] >> (7 - (x & 7))) & 1;
src_data += src->bytes_per_line;
@ -2881,7 +2881,7 @@ static void convert_Mono_to_Indexed8(QImageData *dest, const QImageData *src, Qt
}
} else {
for (int y = 0; y < dest->height; y++) {
register uchar *p = dest_data;
uchar *p = dest_data;
for (int x = 0; x < dest->width; x++)
*p++ = (src_data[x>>3] >> (x & 7)) & 1;
src_data += src->bytes_per_line;

View File

@ -188,7 +188,7 @@ static bool read_pbm_body(QIODevice *device, char type, int w, int h, int mcc, Q
}
}
} else { // read ascii data
register uchar *p;
uchar *p;
int n;
for (y=0; y<h; y++) {
p = outImage->scanLine(y);

View File

@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
X bitmap image read/write functions
*****************************************************************************/
static inline int hex2byte(register char *p)
static inline int hex2byte(char *p)
{
return ((isdigit((uchar) *p) ? *p - '0' : toupper((uchar) *p) - 'A' + 10) << 4) |
(isdigit((uchar) *(p+1)) ? *(p+1) - '0' : toupper((uchar) *(p+1)) - 'A' + 10);
@ -215,7 +215,7 @@ static bool write_xbm_image(const QImage &sourceImage, QIODevice *device, const
}
}
int bcnt = 0;
register char *p = buf;
char *p = buf;
int bpl = (w+7)/8;
for (int y = 0; y < h; ++y) {
uchar *b = image.scanLine(y);

View File

@ -1121,13 +1121,13 @@ static const uint * QT_FASTCALL fetchTransformedBilinearARGB32PM(uint *buffer, c
fx &= fixed_scale - 1;
Q_ASSERT((fx >> 16) == 0);
while (b < end) {
register int x1 = (fx >> 16);
register int x2 = x1 + 1;
int x1 = (fx >> 16);
int x2 = x1 + 1;
Q_ASSERT(x1 >= 0);
Q_ASSERT(x2 < count);
register int distx = (fx & 0x0000ffff) >> 8;
register int idistx = 256 - distx;
int distx = (fx & 0x0000ffff) >> 8;
int idistx = 256 - distx;
int rb = ((intermediate_buffer[0][x1] * idistx + intermediate_buffer[0][x2] * distx) >> 8) & 0xff00ff;
int ag = (intermediate_buffer[1][x1] * idistx + intermediate_buffer[1][x2] * distx) & 0xff00ff00;
*b = rb | ag;
@ -1533,13 +1533,13 @@ static const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Oper
fx &= fixed_scale - 1;
Q_ASSERT((fx >> 16) == 0);
for (int i = 0; i < length; ++i) {
register int x1 = (fx >> 16);
register int x2 = x1 + 1;
int x1 = (fx >> 16);
int x2 = x1 + 1;
Q_ASSERT(x1 >= 0);
Q_ASSERT(x2 < count);
register int distx = (fx & 0x0000ffff) >> 8;
register int idistx = 256 - distx;
int distx = (fx & 0x0000ffff) >> 8;
int idistx = 256 - distx;
int rb = ((buf1[x1] * idistx + buf1[x2] * distx) >> 8) & 0xff00ff;
int ag = (buf2[x1] * idistx + buf2[x2] * distx) & 0xff00ff00;
buffer[i] = rb | ag;

View File

@ -759,7 +759,7 @@ do { \
/* Duff's device */ \
uint *_d = (uint*)(dest) + length; \
const uint *_s = (uint*)(src) + length; \
register int n = ((length) + 7) / 8; \
int n = ((length) + 7) / 8; \
switch ((length) & 0x07) \
{ \
case 0: do { *--_d = *--_s; \
@ -779,7 +779,7 @@ do { \
/* Duff's device */ \
ushort *_d = (ushort*)(dest); \
const ushort *_s = (ushort*)(src); \
register int n = ((length) + 7) / 8; \
int n = ((length) + 7) / 8; \
switch ((length) & 0x07) \
{ \
case 0: do { *_d++ = *_s++; \

View File

@ -218,8 +218,8 @@ void QPolygon::translate(int dx, int dy)
if (dx == 0 && dy == 0)
return;
register QPoint *p = data();
register int i = size();
QPoint *p = data();
int i = size();
QPoint pt(dx, dy);
while (i--) {
*p += pt;
@ -447,7 +447,7 @@ QRect QPolygon::boundingRect() const
{
if (isEmpty())
return QRect(0, 0, 0, 0);
register const QPoint *pd = constData();
const QPoint *pd = constData();
int minx, maxx, miny, maxy;
minx = maxx = pd->x();
miny = maxy = pd->y();
@ -599,8 +599,8 @@ void QPolygonF::translate(const QPointF &offset)
if (offset.isNull())
return;
register QPointF *p = data();
register int i = size();
QPointF *p = data();
int i = size();
while (i--) {
*p += offset;
++p;
@ -660,7 +660,7 @@ QRectF QPolygonF::boundingRect() const
{
if (isEmpty())
return QRectF(0, 0, 0, 0);
register const QPointF *pd = constData();
const QPointF *pd = constData();
qreal minx, maxx, miny, maxy;
minx = maxx = pd->x();
miny = maxy = pd->y();

View File

@ -1585,14 +1585,14 @@ void QRegionPrivate::selfTest() const
static QRegionPrivate qrp;
QRegion::QRegionData QRegion::shared_empty = {Q_BASIC_ATOMIC_INITIALIZER(1), &qrp};
typedef void (*OverlapFunc)(register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End,
register const QRect *r2, const QRect *r2End, register int y1, register int y2);
typedef void (*NonOverlapFunc)(register QRegionPrivate &dest, register const QRect *r, const QRect *rEnd,
register int y1, register int y2);
typedef void (*OverlapFunc)(QRegionPrivate &dest, const QRect *r1, const QRect *r1End,
const QRect *r2, const QRect *r2End, int y1, int y2);
typedef void (*NonOverlapFunc)(QRegionPrivate &dest, const QRect *r, const QRect *rEnd,
int y1, int y2);
static bool EqualRegion(const QRegionPrivate *r1, const QRegionPrivate *r2);
static void UnionRegion(const QRegionPrivate *reg1, const QRegionPrivate *reg2, QRegionPrivate &dest);
static void miRegionOp(register QRegionPrivate &dest, const QRegionPrivate *reg1, const QRegionPrivate *reg2,
static void miRegionOp(QRegionPrivate &dest, const QRegionPrivate *reg1, const QRegionPrivate *reg2,
OverlapFunc overlapFunc, NonOverlapFunc nonOverlap1Func,
NonOverlapFunc nonOverlap2Func);
@ -1789,7 +1789,7 @@ SOFTWARE.
*/
/* $XFree86: xc/lib/X11/Region.c,v 1.1.1.2.2.2 1998/10/04 15:22:50 hohndel Exp $ */
static void UnionRectWithRegion(register const QRect *rect, const QRegionPrivate *source,
static void UnionRectWithRegion(const QRect *rect, const QRegionPrivate *source,
QRegionPrivate &dest)
{
if (rect->isEmpty())
@ -1824,9 +1824,9 @@ static void UnionRectWithRegion(register const QRect *rect, const QRegionPrivate
*/
static void miSetExtents(QRegionPrivate &dest)
{
register const QRect *pBox,
const QRect *pBox,
*pBoxEnd;
register QRect *pExtents;
QRect *pExtents;
dest.innerRect.setCoords(0, 0, -1, -1);
dest.innerArea = -1;
@ -1871,11 +1871,11 @@ static void miSetExtents(QRegionPrivate &dest)
added by raymond
*/
static void OffsetRegion(register QRegionPrivate &region, register int x, register int y)
static void OffsetRegion(QRegionPrivate &region, int x, int y)
{
if (region.rects.size()) {
register QRect *pbox = region.rects.data();
register int nbox = region.numRects;
QRect *pbox = region.rects.data();
int nbox = region.numRects;
while (nbox--) {
pbox->translate(x, y);
@ -1902,12 +1902,12 @@ static void OffsetRegion(register QRegionPrivate &region, register int x, regist
*
*-----------------------------------------------------------------------
*/
static void miIntersectO(register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End,
register const QRect *r2, const QRect *r2End, int y1, int y2)
static void miIntersectO(QRegionPrivate &dest, const QRect *r1, const QRect *r1End,
const QRect *r2, const QRect *r2End, int y1, int y2)
{
register int x1;
register int x2;
register QRect *pNextRect;
int x1;
int x2;
QRect *pNextRect;
pNextRect = dest.rects.data() + dest.numRects;
@ -1967,11 +1967,11 @@ static void miIntersectO(register QRegionPrivate &dest, register const QRect *r1
*
*-----------------------------------------------------------------------
*/
static int miCoalesce(register QRegionPrivate &dest, int prevStart, int curStart)
static int miCoalesce(QRegionPrivate &dest, int prevStart, int curStart)
{
register QRect *pPrevBox; /* Current box in previous band */
register QRect *pCurBox; /* Current box in current band */
register QRect *pRegEnd; /* End of region */
QRect *pPrevBox; /* Current box in previous band */
QRect *pCurBox; /* Current box in current band */
QRect *pRegEnd; /* End of region */
int curNumRects; /* Number of rectangles in current band */
int prevNumRects; /* Number of rectangles in previous band */
int bandY1; /* Y1 coordinate for current band */
@ -2096,21 +2096,21 @@ static int miCoalesce(register QRegionPrivate &dest, int prevStart, int curStart
*
*-----------------------------------------------------------------------
*/
static void miRegionOp(register QRegionPrivate &dest,
static void miRegionOp(QRegionPrivate &dest,
const QRegionPrivate *reg1, const QRegionPrivate *reg2,
OverlapFunc overlapFunc, NonOverlapFunc nonOverlap1Func,
NonOverlapFunc nonOverlap2Func)
{
register const QRect *r1; // Pointer into first region
register const QRect *r2; // Pointer into 2d region
const QRect *r1; // Pointer into first region
const QRect *r2; // Pointer into 2d region
const QRect *r1End; // End of 1st region
const QRect *r2End; // End of 2d region
register int ybot; // Bottom of intersection
register int ytop; // Top of intersection
int ybot; // Bottom of intersection
int ytop; // Top of intersection
int prevBand; // Index of start of previous band in dest
int curBand; // Index of start of current band in dest
register const QRect *r1BandEnd; // End of current band in r1
register const QRect *r2BandEnd; // End of current band in r2
const QRect *r1BandEnd; // End of current band in r1
const QRect *r2BandEnd; // End of current band in r2
int top; // Top of non-overlapping band
int bot; // Bottom of non-overlapping band
@ -2312,10 +2312,10 @@ static void miRegionOp(register QRegionPrivate &dest,
*-----------------------------------------------------------------------
*/
static void miUnionNonO(register QRegionPrivate &dest, register const QRect *r, const QRect *rEnd,
register int y1, register int y2)
static void miUnionNonO(QRegionPrivate &dest, const QRect *r, const QRect *rEnd,
int y1, int y2)
{
register QRect *pNextRect;
QRect *pNextRect;
pNextRect = dest.rects.data() + dest.numRects;
@ -2348,10 +2348,10 @@ static void miUnionNonO(register QRegionPrivate &dest, register const QRect *r,
*-----------------------------------------------------------------------
*/
static void miUnionO(register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End,
register const QRect *r2, const QRect *r2End, register int y1, register int y2)
static void miUnionO(QRegionPrivate &dest, const QRect *r1, const QRect *r1End,
const QRect *r2, const QRect *r2End, int y1, int y2)
{
register QRect *pNextRect;
QRect *pNextRect;
pNextRect = dest.rects.data() + dest.numRects;
@ -2437,10 +2437,10 @@ static void UnionRegion(const QRegionPrivate *reg1, const QRegionPrivate *reg2,
*-----------------------------------------------------------------------
*/
static void miSubtractNonO1(register QRegionPrivate &dest, register const QRect *r,
const QRect *rEnd, register int y1, register int y2)
static void miSubtractNonO1(QRegionPrivate &dest, const QRect *r,
const QRect *rEnd, int y1, int y2)
{
register QRect *pNextRect;
QRect *pNextRect;
pNextRect = dest.rects.data() + dest.numRects;
@ -2471,11 +2471,11 @@ static void miSubtractNonO1(register QRegionPrivate &dest, register const QRect
*-----------------------------------------------------------------------
*/
static void miSubtractO(register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End,
register const QRect *r2, const QRect *r2End, register int y1, register int y2)
static void miSubtractO(QRegionPrivate &dest, const QRect *r1, const QRect *r1End,
const QRect *r2, const QRect *r2End, int y1, int y2)
{
register QRect *pNextRect;
register int x1;
QRect *pNextRect;
int x1;
x1 = r1->left();
@ -2573,7 +2573,7 @@ static void miSubtractO(register QRegionPrivate &dest, register const QRect *r1,
*/
static void SubtractRegion(QRegionPrivate *regM, QRegionPrivate *regS,
register QRegionPrivate &dest)
QRegionPrivate &dest)
{
Q_ASSERT(!isEmptyHelper(regM));
Q_ASSERT(!isEmptyHelper(regS));
@ -2668,12 +2668,12 @@ static bool PointInRegion(QRegionPrivate *pRegion, int x, int y)
return false;
}
static bool RectInRegion(register QRegionPrivate *region, int rx, int ry, uint rwidth, uint rheight)
static bool RectInRegion(QRegionPrivate *region, int rx, int ry, uint rwidth, uint rheight)
{
register const QRect *pbox;
register const QRect *pboxEnd;
const QRect *pbox;
const QRect *pboxEnd;
QRect rect(rx, ry, rwidth, rheight);
register QRect *prect = &rect;
QRect *prect = &rect;
int partIn, partOut;
if (!region || region->numRects == 0 || !EXTENTCHECK(&region->extents, prect))
@ -3094,8 +3094,8 @@ SOFTWARE.
static void InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
ScanLineListBlock **SLLBlock, int *iSLLBlock)
{
register EdgeTableEntry *start, *prev;
register ScanLineList *pSLL, *pPrevSLL;
EdgeTableEntry *start, *prev;
ScanLineList *pSLL, *pPrevSLL;
ScanLineListBlock *tmpSLLBlock;
/*
@ -3172,11 +3172,11 @@ static void InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
*
*/
static void CreateETandAET(register int count, register const QPoint *pts,
EdgeTable *ET, EdgeTableEntry *AET, register EdgeTableEntry *pETEs,
static void CreateETandAET(int count, const QPoint *pts,
EdgeTable *ET, EdgeTableEntry *AET, EdgeTableEntry *pETEs,
ScanLineListBlock *pSLLBlock)
{
register const QPoint *top,
const QPoint *top,
*bottom,
*PrevPt,
*CurrPt;
@ -3259,10 +3259,10 @@ static void CreateETandAET(register int count, register const QPoint *pts,
*
*/
static void loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs)
static void loadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs)
{
register EdgeTableEntry *pPrevAET;
register EdgeTableEntry *tmp;
EdgeTableEntry *pPrevAET;
EdgeTableEntry *tmp;
pPrevAET = AET;
AET = AET->next;
@ -3303,11 +3303,11 @@ static void loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs)
* V-------------------> V---> ...
*
*/
static void computeWAET(register EdgeTableEntry *AET)
static void computeWAET(EdgeTableEntry *AET)
{
register EdgeTableEntry *pWETE;
register int inside = 1;
register int isInside = 0;
EdgeTableEntry *pWETE;
int inside = 1;
int isInside = 0;
AET->nextWETE = 0;
pWETE = AET;
@ -3337,12 +3337,12 @@ static void computeWAET(register EdgeTableEntry *AET)
*
*/
static int InsertionSort(register EdgeTableEntry *AET)
static int InsertionSort(EdgeTableEntry *AET)
{
register EdgeTableEntry *pETEchase;
register EdgeTableEntry *pETEinsert;
register EdgeTableEntry *pETEchaseBackTMP;
register int changed = 0;
EdgeTableEntry *pETEchase;
EdgeTableEntry *pETEinsert;
EdgeTableEntry *pETEchaseBackTMP;
int changed = 0;
AET = AET->next;
while (AET) {
@ -3370,9 +3370,9 @@ static int InsertionSort(register EdgeTableEntry *AET)
/*
* Clean up our act.
*/
static void FreeStorage(register ScanLineListBlock *pSLLBlock)
static void FreeStorage(ScanLineListBlock *pSLLBlock)
{
register ScanLineListBlock *tmpSLLBlock;
ScanLineListBlock *tmpSLLBlock;
while (pSLLBlock) {
tmpSLLBlock = pSLLBlock->next;
@ -3436,7 +3436,7 @@ static inline void flushRow(const QRegionSpan *spans, int y, int numSpans, QRegi
* stack by the calling procedure.
*
*/
static void PtsToRegion(register int numFullPtBlocks, register int iCurPtBlock,
static void PtsToRegion(int numFullPtBlocks, int iCurPtBlock,
POINTBLOCK *FirstPtBlock, QRegionPrivate *reg)
{
int lastRow = 0;
@ -3512,12 +3512,12 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
//int rule; /* winding rule */
{
QRegionPrivate *region;
register EdgeTableEntry *pAET; /* Active Edge Table */
register int y; /* current scanline */
register int iPts = 0; /* number of pts in buffer */
register EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/
register ScanLineList *pSLL; /* current scanLineList */
register QPoint *pts; /* output buffer */
EdgeTableEntry *pAET; /* Active Edge Table */
int y; /* current scanline */
int iPts = 0; /* number of pts in buffer */
EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/
ScanLineList *pSLL; /* current scanLineList */
QPoint *pts; /* output buffer */
EdgeTableEntry *pPrevAET; /* ptr to previous AET */
EdgeTable ET; /* header node for ET */
EdgeTableEntry AET; /* header node for AET */

View File

@ -73,7 +73,7 @@ public:
bool httpOnly;
};
static inline bool isLWS(register char c)
static inline bool isLWS(char c)
{
return c == ' ' || c == '\t' || c == '\r' || c == '\n';
}

View File

@ -67,7 +67,7 @@ QT_BEGIN_NAMESPACE
class QNetworkProxy;
static inline bool isSeparator(register char c)
static inline bool isSeparator(char c)
{
static const char separators[] = "()<>@,;:\\\"/[]?={}";
return isLWS(c) || strchr(separators, c) != 0;
@ -123,7 +123,7 @@ static QHash<QByteArray, QByteArray> parseHttpOptionHeader(const QByteArray &hea
// quoted-pair = "\" CHAR
++pos;
while (pos < header.length()) {
register char c = header.at(pos);
char c = header.at(pos);
if (c == '"') {
// end of quoted text
break;
@ -141,7 +141,7 @@ static QHash<QByteArray, QByteArray> parseHttpOptionHeader(const QByteArray &hea
} else {
// case: token
while (pos < header.length()) {
register char c = header.at(pos);
char c = header.at(pos);
if (isSeparator(c))
break;
value += c;

View File

@ -84,7 +84,7 @@ static inline int qt_safe_socket(int domain, int type, int protocol, int flags =
{
Q_ASSERT((flags & ~O_NONBLOCK) == 0);
register int fd;
int fd;
#if defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK)
int newtype = type | SOCK_CLOEXEC;
if (flags & O_NONBLOCK)
@ -112,7 +112,7 @@ static inline int qt_safe_accept(int s, struct sockaddr *addr, QT_SOCKLEN_T *add
{
Q_ASSERT((flags & ~O_NONBLOCK) == 0);
register int fd;
int fd;
#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC && defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK)
// use accept4
int sockflags = SOCK_CLOEXEC;
@ -144,7 +144,7 @@ static inline int qt_safe_listen(int s, int backlog)
static inline int qt_safe_connect(int sockfd, const struct sockaddr *addr, QT_SOCKLEN_T addrlen)
{
register int ret;
int ret;
// Solaris e.g. expects a non-const 2nd parameter
EINTR_LOOP(ret, QT_SOCKET_CONNECT(sockfd, const_cast<struct sockaddr *>(addr), addrlen));
return ret;
@ -192,7 +192,7 @@ static inline int qt_safe_sendto(int sockfd, const void *buf, size_t len, int fl
qt_ignore_sigpipe();
#endif
register int ret;
int ret;
#ifdef Q_OS_VXWORKS
EINTR_LOOP(ret, ::sendto(sockfd, (char *) buf, len, flags, (struct sockaddr *) to, tolen));
#else

View File

@ -448,7 +448,7 @@ void ICOReader::read4BitBMP(QImage & image)
image = QImage();
break;
}
register uchar *p = image.scanLine(h);
uchar *p = image.scanLine(h);
uchar *b = buf;
for (int i=0; i<icoAttrib.w/2; i++) { // convert nibbles to bytes
*p++ = *b >> 4;
@ -487,7 +487,7 @@ void ICOReader::read16_24_32BMP(QImage & image)
{
if (iod) {
int h = icoAttrib.h;
register QRgb *p;
QRgb *p;
QRgb *end;
uchar *buf = new uchar[image.bytesPerLine()];
int bpl = ((icoAttrib.w*icoAttrib.nbits+31)/32)*4;

View File

@ -664,7 +664,7 @@ void QWindowsKeyMapper::updatePossibleKeyCodes(unsigned char *kbdBuffer, quint32
bool QWindowsKeyMapper::isADeadKey(unsigned int vk_key, unsigned int modifiers)
{
if ((vk_key < NumKeyboardLayoutItems) && keyLayout[vk_key].exists) {
for (register size_t i = 0; i < NumMods; ++i) {
for (size_t i = 0; i < NumMods; ++i) {
if (uint(ModsTbl[i]) == modifiers)
return bool(keyLayout[vk_key].deadkeys & 1<<i);
}

View File

@ -277,7 +277,7 @@ static bool qt_read_dibv5(QDataStream &s, QImage &image)
int bpl = image.bytesPerLine();
uchar *data = image.bits();
register QRgb *p;
QRgb *p;
QRgb *end;
uchar *buf24 = new uchar[bpl];
int bpl24 = ((w*nbits+31)/32)*4;

View File

@ -707,7 +707,7 @@ QApplication::~QApplication()
QWidgetSet *mySet = QWidgetPrivate::allWidgets;
QWidgetPrivate::allWidgets = 0;
for (QWidgetSet::ConstIterator it = mySet->constBegin(); it != mySet->constEnd(); ++it) {
register QWidget *w = *it;
QWidget *w = *it;
if (!w->parent()) // window
w->destroy(true, true);
}
@ -1044,7 +1044,7 @@ void QApplication::setStyle(QStyle *style)
if (QApplicationPrivate::app_style) {
if (QApplicationPrivate::is_app_running && !QApplicationPrivate::is_app_closing) {
for (QWidgetList::ConstIterator it = all.constBegin(); it != all.constEnd(); ++it) {
register QWidget *w = *it;
QWidget *w = *it;
if (!(w->windowType() == Qt::Desktop) && // except desktop
w->testAttribute(Qt::WA_WState_Polished)) { // has been polished
QApplicationPrivate::app_style->unpolish(w);
@ -1086,7 +1086,7 @@ void QApplication::setStyle(QStyle *style)
// re-polish existing widgets if necessary
if (QApplicationPrivate::is_app_running && !QApplicationPrivate::is_app_closing) {
for (QWidgetList::ConstIterator it1 = all.constBegin(); it1 != all.constEnd(); ++it1) {
register QWidget *w = *it1;
QWidget *w = *it1;
if (w->windowType() != Qt::Desktop && w->testAttribute(Qt::WA_WState_Polished)) {
if (w->style() == QApplicationPrivate::app_style)
QApplicationPrivate::app_style->polish(w); // repolish
@ -1098,7 +1098,7 @@ void QApplication::setStyle(QStyle *style)
}
for (QWidgetList::ConstIterator it2 = all.constBegin(); it2 != all.constEnd(); ++it2) {
register QWidget *w = *it2;
QWidget *w = *it2;
if (w->windowType() != Qt::Desktop && !w->testAttribute(Qt::WA_SetStyle)) {
QEvent e(QEvent::StyleChange);
QApplication::sendEvent(w, &e);
@ -1328,7 +1328,7 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char*
QWidgetList wids = QApplication::allWidgets();
for (QWidgetList::ConstIterator it = wids.constBegin(); it != wids.constEnd(); ++it) {
register QWidget *w = *it;
QWidget *w = *it;
if (all || (!className && w->isWindow()) || w->inherits(className)) // matching class
QApplication::sendEvent(w, &e);
}
@ -1510,7 +1510,7 @@ void QApplication::setFont(const QFont &font, const char *className)
QWidgetList wids = QApplication::allWidgets();
for (QWidgetList::ConstIterator it = wids.constBegin(); it != wids.constEnd(); ++it) {
register QWidget *w = *it;
QWidget *w = *it;
if (all || (!className && w->isWindow()) || w->inherits(className)) // matching class
sendEvent(w, &e);
}
@ -1580,7 +1580,7 @@ void QApplication::setWindowIcon(const QIcon &icon)
QEvent e(QEvent::ApplicationWindowIconChange);
QWidgetList all = QApplication::allWidgets();
for (QWidgetList::ConstIterator it = all.constBegin(); it != all.constEnd(); ++it) {
register QWidget *w = *it;
QWidget *w = *it;
if (w->isWindow())
sendEvent(w, &e);
}
@ -2962,7 +2962,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
&& mouse->type() == QEvent::MouseMove && mouse->buttons() == 0) {
// but still send them through all application event filters (normally done by notify_helper)
for (int i = 0; d->extraData && i < d->extraData->eventFilters.size(); ++i) {
register QObject *obj = d->extraData->eventFilters.at(i);
QObject *obj = d->extraData->eventFilters.at(i);
if (!obj)
continue;
if (obj->d_func()->threadData != w->d_func()->threadData) {

View File

@ -380,7 +380,7 @@ void QWhatsThisPrivate::notifyToplevels(QEvent *e)
{
QWidgetList toplevels = QApplication::topLevelWidgets();
for (int i = 0; i < toplevels.count(); ++i) {
register QWidget *w = toplevels.at(i);
QWidget *w = toplevels.at(i);
QApplication::sendEvent(w, e);
}
}

View File

@ -582,7 +582,7 @@ bool QWindowsXPStylePrivate::hasAlphaChannel(const QRect &rect)
int firstAlpha = -1;
for (int y = startY; y < h/2; ++y) {
register DWORD *buffer = (DWORD*)bufferPixels + (y * bufferW);
DWORD *buffer = (DWORD*)bufferPixels + (y * bufferW);
for (int x = startX; x < w; ++x, ++buffer) {
int alpha = (*buffer) >> 24;
if (firstAlpha == -1)
@ -611,8 +611,8 @@ bool QWindowsXPStylePrivate::fixAlphaChannel(const QRect &rect)
bool hasFixedAlphaValue = false;
for (int y = startY; y < h; ++y) {
register DWORD *buffer = (DWORD*)bufferPixels + (y * bufferW);
for (register int x = startX; x < w; ++x, ++buffer) {
DWORD *buffer = (DWORD*)bufferPixels + (y * bufferW);
for (int x = startX; x < w; ++x, ++buffer) {
uint pixel = *buffer;
int alpha = qAlpha(pixel);
if (qRed(pixel) > alpha || qGreen(pixel) > alpha || qBlue(pixel) > alpha) {
@ -643,13 +643,13 @@ bool QWindowsXPStylePrivate::swapAlphaChannel(const QRect &rect, bool allPixels)
// Flip the alphas, so that 255-alpha pixels are 0, and 0-alpha are 255.
for (int y = startY; y < h; ++y) {
register DWORD *buffer = (DWORD*)bufferPixels + (y * bufferW);
for (register int x = startX; x < w; ++x, ++buffer) {
DWORD *buffer = (DWORD*)bufferPixels + (y * bufferW);
for (int x = startX; x < w; ++x, ++buffer) {
if (allPixels) {
*buffer |= 0xFF000000;
continue;
}
register unsigned int alphaValue = (*buffer) & 0xFF000000;
unsigned int alphaValue = (*buffer) & 0xFF000000;
if (alphaValue == 0xFF000000) {
*buffer = 0;
valueChange = true;

View File

@ -429,7 +429,7 @@ void QLCDNumber::setDigitCount(int numDigits)
bool doDisplay = d->ndigits == 0;
if (numDigits == d->ndigits) // no change
return;
register int i;
int i;
int dif;
if (numDigits > d->ndigits) { // expand
dif = numDigits - d->ndigits;