summaryrefslogtreecommitdiffstats
path: root/src/tools/qglist.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2020-01-30 20:17:32 +0900
committerSlávek Banko <[email protected]>2021-02-02 00:33:10 +0100
commit7e66c403623bdb20b01ff05ebc5e2dfc30f15b3e (patch)
tree59a3ce045c4768ecdc5ea99da560934619fbb0a9 /src/tools/qglist.cpp
parentd8d67a842b11ba1b0c2ce83d7168670941499dbf (diff)
downloadqt3-7e66c403623bdb20b01ff05ebc5e2dfc30f15b3e.tar.gz
qt3-7e66c403623bdb20b01ff05ebc5e2dfc30f15b3e.zip
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <[email protected]> (cherry picked from commit 961eb3f6e276b4a3609328a3076ef790026e9c03)
Diffstat (limited to 'src/tools/qglist.cpp')
-rw-r--r--src/tools/qglist.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/tools/qglist.cpp b/src/tools/qglist.cpp
index fb94427..ef4c051 100644
--- a/src/tools/qglist.cpp
+++ b/src/tools/qglist.cpp
@@ -350,7 +350,7 @@ QLNode *QGList::locate( uint index )
curNode = firstNode;
curIndex = 0;
}
- register QLNode *node;
+ QLNode *node;
int distance = index - curIndex; // node distance to cur node
bool forward; // direction to traverse
@@ -405,7 +405,7 @@ void QGList::inSort( QPtrCollection::Item d )
//mutex->lock();
#endif
int index = 0;
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
while ( n && compareItems(n->data,d) < 0 ){ // find position in list
n = n->next;
index++;
@@ -426,7 +426,7 @@ void QGList::prepend( QPtrCollection::Item d )
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n = new QLNode( newItem(d) );
+ QLNode *n = new QLNode( newItem(d) );
Q_CHECK_PTR( n );
n->prev = 0;
if ( (n->next = firstNode) ) // list is not empty
@@ -451,7 +451,7 @@ void QGList::append( QPtrCollection::Item d )
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n = new QLNode( newItem(d) );
+ QLNode *n = new QLNode( newItem(d) );
Q_CHECK_PTR( n );
n->next = 0;
if ( (n->prev = lastNode) ) { // list is not empty
@@ -500,7 +500,7 @@ bool QGList::insertAt( uint index, QPtrCollection::Item d )
return FALSE;
}
QLNode *prevNode = nextNode->prev;
- register QLNode *n = new QLNode( newItem(d) );
+ QLNode *n = new QLNode( newItem(d) );
Q_CHECK_PTR( n );
nextNode->prev = n;
Q_ASSERT( (!((curIndex > 0) && (!prevNode))) );
@@ -564,7 +564,7 @@ QLNode *QGList::unlink()
#endif
return 0;
}
- register QLNode *n = curNode; // unlink this node
+ QLNode *n = curNode; // unlink this node
if ( n == firstNode ) { // removing first node ?
if ( (firstNode = n->next) ) {
firstNode->prev = 0;
@@ -881,7 +881,7 @@ void QGList::clear()
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
firstNode = lastNode = curNode = 0; // initialize list
numNodes = 0;
@@ -914,7 +914,7 @@ int QGList::findRef( QPtrCollection::Item d, bool fromStart )
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n;
+ QLNode *n;
int index;
if ( fromStart ) { // start from first node
n = firstNode;
@@ -946,7 +946,7 @@ int QGList::find( QPtrCollection::Item d, bool fromStart )
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n;
+ QLNode *n;
int index;
if ( fromStart ) { // start from first node
n = firstNode;
@@ -977,7 +977,7 @@ uint QGList::containsRef( QPtrCollection::Item d ) const
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
uint count = 0;
while ( n ) { // for all nodes...
if ( n->data == d ) // count # exact matches
@@ -1000,7 +1000,7 @@ uint QGList::contains( QPtrCollection::Item d ) const
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
uint count = 0;
QGList *that = (QGList*)this; // mutable for compareItems()
while ( n ) { // for all nodes...
@@ -1167,7 +1167,7 @@ void QGList::toVector( QGVector *vector ) const
#endif
return;
}
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
uint i = 0;
while ( n ) {
vector->insert( i, n->data );