mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-08-01 02:15:54 -04:00
Revert "Revert "newer standards prefer nullptr over NULL - this is most of them but there are others too""
This reverts commit 8e2160f33e.
This commit is contained in:
+3
-3
@@ -6,7 +6,7 @@ namespace NAMESPACE
|
||||
#endif
|
||||
|
||||
TcpBlockAllocator::TcpBlockAllocator(const unsigned initSize, const unsigned initCount)
|
||||
: m_freeHead(NULL), m_blockCount(initCount), m_blockSize(initSize), m_numAvailBlocks(0)
|
||||
: m_freeHead(nullptr), m_blockCount(initCount), m_blockSize(initSize), m_numAvailBlocks(0)
|
||||
{
|
||||
realloc();
|
||||
}
|
||||
@@ -33,7 +33,7 @@ data_block *TcpBlockAllocator::getBlock()
|
||||
|
||||
tmp = m_freeHead;
|
||||
m_freeHead = m_freeHead->m_next;
|
||||
tmp->m_next = NULL;
|
||||
tmp->m_next = nullptr;
|
||||
m_numAvailBlocks--;
|
||||
return(tmp);
|
||||
}
|
||||
@@ -56,7 +56,7 @@ void TcpBlockAllocator::returnBlock(data_block *b)
|
||||
|
||||
void TcpBlockAllocator::realloc()
|
||||
{
|
||||
data_block *tmp = NULL, *cursor = NULL;
|
||||
data_block *tmp = nullptr, *cursor = nullptr;
|
||||
|
||||
tmp = new data_block; m_numAvailBlocks++;
|
||||
cursor = tmp;
|
||||
|
||||
Reference in New Issue
Block a user