summaryrefslogtreecommitdiffstats
path: root/src/HTTPServer/HTTPConnection.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-23 08:29:31 +0200
committerMattes D <github@xoft.cz>2014-10-23 08:29:31 +0200
commit4bfd2c9707f2c8484587f061393e8f9346d60fef (patch)
tree4b7bea204c0ddd18bb4f95357f9eb77590bc2e8d /src/HTTPServer/HTTPConnection.cpp
parentComposableGenerator: Removed nullptr initializers. (diff)
parentEn masse NULL -> nullptr replace (diff)
downloadcuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar
cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.gz
cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.bz2
cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.lz
cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.xz
cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.zst
cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.zip
Diffstat (limited to 'src/HTTPServer/HTTPConnection.cpp')
-rw-r--r--src/HTTPServer/HTTPConnection.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/HTTPServer/HTTPConnection.cpp b/src/HTTPServer/HTTPConnection.cpp
index bf46bb241..d5dbf0199 100644
--- a/src/HTTPServer/HTTPConnection.cpp
+++ b/src/HTTPServer/HTTPConnection.cpp
@@ -15,7 +15,7 @@
cHTTPConnection::cHTTPConnection(cHTTPServer & a_HTTPServer) :
m_HTTPServer(a_HTTPServer),
m_State(wcsRecvHeaders),
- m_CurrentRequest(NULL),
+ m_CurrentRequest(nullptr),
m_CurrentRequestBodyRemaining(0)
{
// LOGD("HTTP: New connection at %p", this);
@@ -29,7 +29,7 @@ cHTTPConnection::~cHTTPConnection()
{
// LOGD("HTTP: Connection deleting: %p", this);
delete m_CurrentRequest;
- m_CurrentRequest = NULL;
+ m_CurrentRequest = nullptr;
}
@@ -136,7 +136,7 @@ void cHTTPConnection::AwaitNextRequest(void)
void cHTTPConnection::Terminate(void)
{
- if (m_CurrentRequest != NULL)
+ if (m_CurrentRequest != nullptr)
{
m_HTTPServer.RequestFinished(*this, *m_CurrentRequest);
}
@@ -153,7 +153,7 @@ bool cHTTPConnection::DataReceived(const char * a_Data, size_t a_Size)
{
case wcsRecvHeaders:
{
- if (m_CurrentRequest == NULL)
+ if (m_CurrentRequest == nullptr)
{
m_CurrentRequest = new cHTTPRequest;
}
@@ -162,7 +162,7 @@ bool cHTTPConnection::DataReceived(const char * a_Data, size_t a_Size)
if (BytesConsumed == AString::npos)
{
delete m_CurrentRequest;
- m_CurrentRequest = NULL;
+ m_CurrentRequest = nullptr;
m_State = wcsInvalid;
m_HTTPServer.CloseConnection(*this);
return true;
@@ -196,7 +196,7 @@ bool cHTTPConnection::DataReceived(const char * a_Data, size_t a_Size)
case wcsRecvBody:
{
- ASSERT(m_CurrentRequest != NULL);
+ ASSERT(m_CurrentRequest != nullptr);
if (m_CurrentRequestBodyRemaining > 0)
{
size_t BytesToConsume = std::min(m_CurrentRequestBodyRemaining, (size_t)a_Size);
@@ -214,7 +214,7 @@ bool cHTTPConnection::DataReceived(const char * a_Data, size_t a_Size)
return true;
}
delete m_CurrentRequest;
- m_CurrentRequest = NULL;
+ m_CurrentRequest = nullptr;
}
break;
}
@@ -243,7 +243,7 @@ void cHTTPConnection::GetOutgoingData(AString & a_Data)
void cHTTPConnection::SocketClosed(void)
{
- if (m_CurrentRequest != NULL)
+ if (m_CurrentRequest != nullptr)
{
m_HTTPServer.RequestFinished(*this, *m_CurrentRequest);
}