diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /protocols/SkypeWeb/src/request_queue.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/SkypeWeb/src/request_queue.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/request_queue.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/SkypeWeb/src/request_queue.cpp b/protocols/SkypeWeb/src/request_queue.cpp index 84d725aba4..e0c72c9cee 100644 --- a/protocols/SkypeWeb/src/request_queue.cpp +++ b/protocols/SkypeWeb/src/request_queue.cpp @@ -21,7 +21,7 @@ RequestQueue::RequestQueue(HNETLIBUSER _nlu) : nlu(_nlu), requests(1)
{
isTerminated = true;
- hRequestQueueThread = NULL;
+ hRequestQueueThread = nullptr;
}
RequestQueue::~RequestQueue()
@@ -40,7 +40,7 @@ void RequestQueue::Start() return;
isTerminated = false;
- if (hRequestQueueThread == NULL)
+ if (hRequestQueueThread == nullptr)
hRequestQueueThread = mir_forkthread((pThreadFunc)&RequestQueue::WorkerThread, this);
}
@@ -70,13 +70,13 @@ void RequestQueue::Push(HttpRequest *request, HttpResponseCallback response, voi void RequestQueue::Send(HttpRequest *request, HttpResponseCallback response, void *arg)
{
RequestQueueItem *item = new RequestQueueItem(request, response, arg);
- mir_forkthreadowner((pThreadFuncOwner)&RequestQueue::AsyncSendThread, this, item, 0);
+ mir_forkthreadowner((pThreadFuncOwner)&RequestQueue::AsyncSendThread, this, item, nullptr);
}
void RequestQueue::Execute(RequestQueueItem *item)
{
NETLIBHTTPREQUEST *response = item->request->Send(nlu);
- if (item->responseCallback != NULL)
+ if (item->responseCallback != nullptr)
item->responseCallback(response, item->arg);
Netlib_FreeHttpRequest(response);
requests.remove(item);
@@ -103,7 +103,7 @@ unsigned int RequestQueue::WorkerThread(void *arg) break;
while (true) {
- RequestQueueItem *item = NULL;
+ RequestQueueItem *item = nullptr;
{
mir_cslock lock(queue->requestQueueLock);
@@ -113,11 +113,11 @@ unsigned int RequestQueue::WorkerThread(void *arg) item = queue->requests[0];
queue->requests.remove(0);
}
- if (item != NULL)
+ if (item != nullptr)
queue->Execute(item);
}
}
- queue->hRequestQueueThread = NULL;
+ queue->hRequestQueueThread = nullptr;
return 0;
}
\ No newline at end of file |