aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.h
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2018-09-20 17:57:13 -0400
committerMarcoFalke <[email protected]>2018-09-20 17:57:20 -0400
commit2796c6e5ec9055545e987023b04eb5ebe64d5320 (patch)
tree4ab72e1699f43cb0e860a6f3f401644d59eaaeb3 /src/httpserver.h
parentMerge #14272: init: Remove deprecated args from hidden args (diff)
parentconvert C-style (void) parameter lists to C++ style () (diff)
downloaddiscoin-2796c6e5ec9055545e987023b04eb5ebe64d5320.tar.xz
discoin-2796c6e5ec9055545e987023b04eb5ebe64d5320.zip
Merge #14214: convert C-style (void) parameter lists to C++ style ()
3ccfa34b32 convert C-style (void) parameter lists to C++ style () (Arvid Norberg) Pull request description: In C, an empty parameter list, `()`, means the function takes any arguments, and `(void)` means the function does not take any parameters. In C++, an empty parameter list means the function does not take any parameters. So, C++ still supports `(void)` parameter lists with the same semantics, why change to `()`? 1. removing the redundant `void` improves signal-to-noise ratio of the code 2. using `(void)` exposes a rare inconsistency in that a template taking a template `(T)` parameter list, cannot be instantiated with `T=void` Tree-SHA512: be2897b6c5e474873aa878ed6bac098382cd21866aec33752fe40b089a6331aa6263cae749aba1b4a41e8467f1a47086d32eb74abaf09927fd5a2f44a4b2109a
Diffstat (limited to 'src/httpserver.h')
-rw-r--r--src/httpserver.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/httpserver.h b/src/httpserver.h
index 67c6a8831..63f96734f 100644
--- a/src/httpserver.h
+++ b/src/httpserver.h
@@ -134,7 +134,7 @@ public:
* deleteWhenTriggered deletes this event object after the event is triggered (and the handler called)
* handler is the handler to call when the event is triggered.
*/
- HTTPEvent(struct event_base* base, bool deleteWhenTriggered, const std::function<void(void)>& handler);
+ HTTPEvent(struct event_base* base, bool deleteWhenTriggered, const std::function<void()>& handler);
~HTTPEvent();
/** Trigger the event. If tv is 0, trigger it immediately. Otherwise trigger it after
@@ -143,7 +143,7 @@ public:
void trigger(struct timeval* tv);
bool deleteWhenTriggered;
- std::function<void(void)> handler;
+ std::function<void()> handler;
private:
struct event* ev;
};