Skip to content

Commit

Permalink
yield & error empty signature methods
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenjs committed Mar 8, 2017
1 parent 70b525c commit b8228d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/wampcc/wamp_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,13 @@ namespace wampcc {
std::function<void(std::string, json_array, json_object)> error_fn;

/* Wrappers to yield_fn */
void yield() { yield_fn({}, {}); }
void yield(json_array arr) { yield_fn(std::move(arr), {}); }
void yield(json_object obj) { yield_fn({}, std::move(obj)); }
void yield(json_array arr, json_object obj) { yield_fn(std::move(arr), std::move(obj)); }

/* Wrapper to error_fn */
void error(std::string txt) { error_fn(std::move(txt), {}, {}); }
void error(std::string txt, json_array arr) { error_fn(std::move(txt), std::move(arr), {}); }
void error(std::string txt, json_object obj) { error_fn(std::move(txt), {}, std::move(obj)); }
void error(std::string txt, json_array arr, json_object obj) { error_fn(std::move(txt), std::move(arr), std::move(obj)); }
Expand Down

0 comments on commit b8228d7

Please sign in to comment.