Skip to content

Commit

Permalink
Fixup build
Browse files Browse the repository at this point in the history
UNUSED wasn't defined here anymore, so this just adds some quick boilerplate to replace it
and that uses the class's private members.
  • Loading branch information
Vultraz committed Jan 23, 2021
1 parent f8a45f2 commit 8a316fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/gui/dialogs/multiplayer/match_history.cpp
Expand Up @@ -29,14 +29,17 @@ mp_match_history::mp_match_history(mp::user_info& info, wesnothd_connection& con
: info_(info)
, connection_(connection)
{
register_label("title", true, VGETTEXT("Match History — $player", {{"player", info.name}}));

UNUSED(info_);
UNUSED(connection_);
register_label("title", true, VGETTEXT("Match History — $player", {{"player", info_.name}}));
}

void mp_match_history::pre_show(window& /*window*/)
{
request_history(0);
}

void mp_match_history::request_history(int offset)
{
connection_.send_data({ "game_history_request", config { "offset", offset } });
}

} // namespace dialogs
Expand Down
2 changes: 2 additions & 0 deletions src/gui/dialogs/multiplayer/match_history.hpp
Expand Up @@ -44,6 +44,8 @@ class mp_match_history : public modal_dialog
/** Inherited from modal_dialog. */
virtual void pre_show(window& window) override;

void request_history(int offset);

mp::user_info& info_;

wesnothd_connection& connection_;
Expand Down

0 comments on commit 8a316fa

Please sign in to comment.