fix variable shadowing

This commit is contained in:
Konstantin Käfer
2014-10-22 18:06:11 +02:00
parent 74387c54e3
commit 214f99673f
60 changed files with 276 additions and 278 deletions

View File

@@ -82,19 +82,19 @@ void HTTPRequest::startHTTPRequest(std::unique_ptr<Response> &&res) {
#else
uv_async_init(loop, http_baton->async, [](uv_async_t *async) {
#endif
util::ptr<HTTPRequestBaton> &http_baton = *(util::ptr<HTTPRequestBaton> *)async->data;
util::ptr<HTTPRequestBaton> &baton = *(util::ptr<HTTPRequestBaton> *)async->data;
if (http_baton->request) {
HTTPRequest *request = http_baton->request;
if (baton->request) {
HTTPRequest *request = baton->request;
request->http_baton.reset();
http_baton->request = nullptr;
request->handleHTTPResponse(http_baton->type, std::move(http_baton->response));
baton->request = nullptr;
request->handleHTTPResponse(baton->type, std::move(baton->response));
}
delete (util::ptr<HTTPRequestBaton> *)async->data;
uv_close((uv_handle_t *)async, [](uv_handle_t *handle) {
uv_async_t *async = (uv_async_t *)handle;
delete async;
uv_async_t *async_handle = (uv_async_t *)handle;
delete async_handle;
});
});
attempts++;

View File

@@ -68,8 +68,8 @@ SQLiteStore::~SQLiteStore() {
// Nothing to do. This function needs to be here because we're forward-declaring
// Database, so we need the actual definition here to be able to properly destruct it.
if (worker) {
uv_worker_close(worker, [](uv_worker_t *worker) {
delete worker;
uv_worker_close(worker, [](uv_worker_t *worker_handle) {
delete worker_handle;
});
}
}