Skip to content

Commit ff8d279

Browse files
committed
Do not shadow member variables
1 parent cf2cecb commit ff8d279

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/httprpc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class HTTPRPCTimer : public RPCTimerBase
4545
class HTTPRPCTimerInterface : public RPCTimerInterface
4646
{
4747
public:
48-
HTTPRPCTimerInterface(struct event_base* base) : base(base)
48+
HTTPRPCTimerInterface(struct event_base* _base) : base(_base)
4949
{
5050
}
5151
const char* Name()

src/httpserver.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ static const size_t MAX_HEADERS_SIZE = 8192;
4242
class HTTPWorkItem : public HTTPClosure
4343
{
4444
public:
45-
HTTPWorkItem(std::unique_ptr<HTTPRequest> req, const std::string &path, const HTTPRequestHandler& func):
46-
req(std::move(req)), path(path), func(func)
45+
HTTPWorkItem(std::unique_ptr<HTTPRequest> _req, const std::string &_path, const HTTPRequestHandler& _func):
46+
req(std::move(_req)), path(_path), func(_func)
4747
{
4848
}
4949
void operator()()
@@ -92,8 +92,8 @@ class WorkQueue
9292
};
9393

9494
public:
95-
WorkQueue(size_t maxDepth) : running(true),
96-
maxDepth(maxDepth),
95+
WorkQueue(size_t _maxDepth) : running(true),
96+
maxDepth(_maxDepth),
9797
numThreads(0)
9898
{
9999
}
@@ -158,8 +158,8 @@ class WorkQueue
158158
struct HTTPPathHandler
159159
{
160160
HTTPPathHandler() {}
161-
HTTPPathHandler(std::string prefix, bool exactMatch, HTTPRequestHandler handler):
162-
prefix(prefix), exactMatch(exactMatch), handler(handler)
161+
HTTPPathHandler(std::string _prefix, bool _exactMatch, HTTPRequestHandler _handler):
162+
prefix(_prefix), exactMatch(_exactMatch), handler(_handler)
163163
{
164164
}
165165
std::string prefix;
@@ -517,8 +517,8 @@ static void httpevent_callback_fn(evutil_socket_t, short, void* data)
517517
delete self;
518518
}
519519

520-
HTTPEvent::HTTPEvent(struct event_base* base, bool deleteWhenTriggered, const std::function<void(void)>& handler):
521-
deleteWhenTriggered(deleteWhenTriggered), handler(handler)
520+
HTTPEvent::HTTPEvent(struct event_base* base, bool _deleteWhenTriggered, const std::function<void(void)>& _handler):
521+
deleteWhenTriggered(_deleteWhenTriggered), handler(_handler)
522522
{
523523
ev = event_new(base, -1, 0, httpevent_callback_fn, this);
524524
assert(ev);
@@ -534,7 +534,7 @@ void HTTPEvent::trigger(struct timeval* tv)
534534
else
535535
evtimer_add(ev, tv); // trigger after timeval passed
536536
}
537-
HTTPRequest::HTTPRequest(struct evhttp_request* req) : req(req),
537+
HTTPRequest::HTTPRequest(struct evhttp_request* _req) : req(_req),
538538
replySent(false)
539539
{
540540
}

0 commit comments

Comments
 (0)