summaryrefslogtreecommitdiffstats
path: root/qtools/qglist.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-11-27 10:34:55 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-11-27 10:34:55 (GMT)
commitb6101af96fb793d9e9bdc0c34f0690545f3a1e56 (patch)
tree75537b0958a7d24c92b2b06ac64f3e20914faa6c /qtools/qglist.cpp
parent8c7b1352474e4da5024cfc3ecc25a486b1d4ef2a (diff)
downloadDoxygen-b6101af96fb793d9e9bdc0c34f0690545f3a1e56.zip
Doxygen-b6101af96fb793d9e9bdc0c34f0690545f3a1e56.tar.gz
Doxygen-b6101af96fb793d9e9bdc0c34f0690545f3a1e56.tar.bz2
Keyword register (in code) is deprecated since C++11
The keyword `register` is deprecated since C++11: - for the Darwin platform it was already filtered (-Wno-deprecated-register) - CLan emits: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
Diffstat (limited to 'qtools/qglist.cpp')
-rw-r--r--qtools/qglist.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/qtools/qglist.cpp b/qtools/qglist.cpp
index 731d9fd..8197db5 100644
--- a/qtools/qglist.cpp
+++ b/qtools/qglist.cpp
@@ -280,7 +280,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
@@ -327,7 +327,7 @@ QLNode *QGList::locate( uint index )
void QGList::inSort( QCollection::Item d )
{
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++;
@@ -343,7 +343,7 @@ void QGList::inSort( QCollection::Item d )
void QGList::prepend( QCollection::Item d )
{
- register QLNode *n = new QLNode( newItem(d) );
+ QLNode *n = new QLNode( newItem(d) );
CHECK_PTR( n );
n->prev = 0;
if ( (n->next = firstNode) ) // list is not empty
@@ -363,7 +363,7 @@ void QGList::prepend( QCollection::Item d )
void QGList::append( QCollection::Item d )
{
- register QLNode *n = new QLNode( newItem(d) );
+ QLNode *n = new QLNode( newItem(d) );
CHECK_PTR( n );
n->next = 0;
if ( (n->prev = lastNode) ) // list is not empty
@@ -394,7 +394,7 @@ bool QGList::insertAt( uint index, QCollection::Item d )
if ( !nextNode ) // illegal position
return FALSE;
QLNode *prevNode = nextNode->prev;
- register QLNode *n = new QLNode( newItem(d) );
+ QLNode *n = new QLNode( newItem(d) );
CHECK_PTR( n );
nextNode->prev = n;
prevNode->next = n;
@@ -437,7 +437,7 @@ QLNode *QGList::unlink()
{
if ( curNode == 0 ) // null current node
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;
@@ -651,7 +651,7 @@ QCollection::Item QGList::takeLast()
void QGList::clear()
{
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
firstNode = lastNode = curNode = 0; // initialize list
numNodes = 0;
@@ -682,7 +682,7 @@ void QGList::clear()
int QGList::findRef( QCollection::Item d, bool fromStart )
{
- register QLNode *n;
+ QLNode *n;
int index;
if ( fromStart ) { // start from first node
n = firstNode;
@@ -707,7 +707,7 @@ int QGList::findRef( QCollection::Item d, bool fromStart )
int QGList::find( QCollection::Item d, bool fromStart )
{
- register QLNode *n;
+ QLNode *n;
int index;
if ( fromStart ) { // start from first node
n = firstNode;
@@ -733,7 +733,7 @@ int QGList::find( QCollection::Item d, bool fromStart )
uint QGList::containsRef( QCollection::Item d ) const
{
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
uint count = 0;
while ( n ) { // for all nodes...
if ( n->data == d ) // count # exact matches
@@ -750,7 +750,7 @@ uint QGList::containsRef( QCollection::Item d ) const
uint QGList::contains( QCollection::Item d ) const
{
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
uint count = 0;
QGList *that = (QGList*)this; // mutable for compareItems()
while ( n ) { // for all nodes...
@@ -876,7 +876,7 @@ void QGList::toVector( QGVector *vector ) const
vector->clear();
if ( !vector->resize( count() ) )
return;
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
uint i = 0;
while ( n ) {
vector->insert( i, n->data );