Fixed up a bunch of compiler warnings.

There should be no functional difference, just less noise when compiling
This commit is contained in:
Collin Kidder
2019-08-08 21:15:51 -04:00
parent 27fa8e6c8b
commit e7e65b7216
27 changed files with 187 additions and 187 deletions
+5 -5
View File
@@ -14,7 +14,7 @@ template<class T>
class LFQueue
{
public:
LFQueue() : mSize(0), mArray(NULL){}
LFQueue() : mSize(0), mArray(nullptr){}
~LFQueue() {setSize(0);}
@@ -24,14 +24,14 @@ public:
if(mArray) {
delete[] mArray;
mArray = NULL;
mArray = nullptr;
}
if(size>0) {
mArray = new T[size];
if(mArray)
mSize = size;
return ( mArray!=NULL );
return ( mArray != nullptr );
}
return true;
@@ -44,7 +44,7 @@ public:
T* get() {
if(IS_FULL())
return NULL;
return nullptr;
return &(mArray[mWIdx.loadAcquire()]); /* prevent memory reordering (belt and braces) */
}
@@ -63,7 +63,7 @@ public:
T* peek() {
if(IS_EMPTY())
return NULL;
return nullptr;
return &(mArray[mRIdx.loadAcquire()]); /* prevent memory reordering (belt and braces) */
}