Skip to content

Commit

Permalink
added [[maybe_unused]] in some places where it was needed (brainboxdo…
Browse files Browse the repository at this point in the history
  • Loading branch information
1mi0 authored and Mishura4 committed Sep 17, 2023
1 parent 19295b2 commit e46ca56
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/dpp/collector.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ template<class T, class C> class collector
stored.push_back(*v);
}
};
tl = new dpp::timed_listener<event_router_t<T>, std::function<void(const T&)>>(cl, duration, event, f, [this](dpp::timer timer_handle) {
tl = new dpp::timed_listener<event_router_t<T>, std::function<void(const T&)>>(cl, duration, event, f, [this]([[maybe_unused]] dpp::timer timer_handle) {
if (!triggered) {
triggered = true;
completed(stored);
Expand Down
4 changes: 2 additions & 2 deletions include/dpp/json_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace dpp {
* @param j nlohmann::json object
* @return T& Reference to self for fluent calling
*/
T& fill_from_json(nlohmann::json* j) {
T& fill_from_json([[maybe_unused]] nlohmann::json* j) {
throw dpp::logic_exception("JSON interface doesn't implement parse_from_json");
}

Expand All @@ -54,7 +54,7 @@ namespace dpp {
* @param with_id Include the ID in the JSON
* @return std::string JSON string version of object
*/
virtual std::string build_json(bool with_id = false) const {
virtual std::string build_json([[maybe_unused]] bool with_id = false) const {
throw dpp::logic_exception("JSON interface doesn't implement build_json");
}
};
Expand Down
2 changes: 1 addition & 1 deletion include/dpp/timed_listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ template <typename attached_event, class listening_function> class timed_listene
/* Attach event */
listener_handle = ev(listener);
/* Create timer */
th = cl->start_timer([this](dpp::timer timer_handle) {
th = cl->start_timer([this]([[maybe_unused]] dpp::timer timer_handle) {
/* Timer has finished, detach it from event.
* Only allowed to tick once.
*/
Expand Down

0 comments on commit e46ca56

Please sign in to comment.