Fixup build

UNUSED wasn't defined here anymore, so this just adds some quick boilerplate to replace it
and that uses the class's private members.
This commit is contained in:
Charles Dang 2021-01-23 22:47:01 +11:00
parent f8a45f2be9
commit 8a316fa094
2 changed files with 9 additions and 4 deletions

View file

@ -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

View file

@ -44,6 +44,8 @@ private:
/** Inherited from modal_dialog. */
virtual void pre_show(window& window) override;
void request_history(int offset);
mp::user_info& info_;
wesnothd_connection& connection_;