mirror of https://gitee.com/bigwinds/arangodb
fixed initialized order warning
This commit is contained in:
parent
5a7c5e282d
commit
e5cb905b62
|
@ -64,8 +64,8 @@ SocketTask::SocketTask (TRI_socket_t socket, double keepAliveTimeout)
|
||||||
ownBuffer(true),
|
ownBuffer(true),
|
||||||
writeLength(0),
|
writeLength(0),
|
||||||
_readBuffer(nullptr),
|
_readBuffer(nullptr),
|
||||||
tid(0),
|
_clientClosed(false),
|
||||||
_clientClosed(false) {
|
tid(0) {
|
||||||
|
|
||||||
_readBuffer = new StringBuffer(TRI_UNKNOWN_MEM_ZONE);
|
_readBuffer = new StringBuffer(TRI_UNKNOWN_MEM_ZONE);
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ SocketTask::~SocketTask () {
|
||||||
|
|
||||||
#ifdef TRI_ENABLE_FIGURES
|
#ifdef TRI_ENABLE_FIGURES
|
||||||
|
|
||||||
if (_writeBufferStatistics != 0) {
|
if (_writeBufferStatistics != nullptr) {
|
||||||
TRI_ReleaseRequestStatistics(_writeBufferStatistics);
|
TRI_ReleaseRequestStatistics(_writeBufferStatistics);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ void SocketTask::setWriteBuffer (StringBuffer* buffer,
|
||||||
|
|
||||||
_writeBufferStatistics = statistics;
|
_writeBufferStatistics = statistics;
|
||||||
|
|
||||||
if (_writeBufferStatistics != 0) {
|
if (_writeBufferStatistics != nullptr) {
|
||||||
_writeBufferStatistics->_writeStart = TRI_StatisticsTime();
|
_writeBufferStatistics->_writeStart = TRI_StatisticsTime();
|
||||||
_writeBufferStatistics->_sentBytes += buffer->length();
|
_writeBufferStatistics->_sentBytes += buffer->length();
|
||||||
}
|
}
|
||||||
|
@ -292,7 +292,7 @@ void SocketTask::setWriteBuffer (StringBuffer* buffer,
|
||||||
// we might have a new write buffer or none at all
|
// we might have a new write buffer or none at all
|
||||||
TRI_ASSERT(tid == Thread::currentThreadId());
|
TRI_ASSERT(tid == Thread::currentThreadId());
|
||||||
|
|
||||||
if (_writeBuffer == 0) {
|
if (_writeBuffer == nullptr) {
|
||||||
_scheduler->stopSocketEvents(writeWatcher);
|
_scheduler->stopSocketEvents(writeWatcher);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -382,7 +382,7 @@ bool SocketTask::setup (Scheduler* scheduler, EventLoop loop) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void SocketTask::cleanup () {
|
void SocketTask::cleanup () {
|
||||||
if (_scheduler == 0) {
|
if (_scheduler == nullptr) {
|
||||||
LOG_WARNING("In SocketTask::cleanup the scheduler has disappeared -- invalid pointer");
|
LOG_WARNING("In SocketTask::cleanup the scheduler has disappeared -- invalid pointer");
|
||||||
watcher = 0;
|
watcher = 0;
|
||||||
keepAliveWatcher = 0;
|
keepAliveWatcher = 0;
|
||||||
|
|
Loading…
Reference in New Issue