summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/listeners/insertcardlistener.h17
-rw-r--r--src/listeners/openurllistener.h15
-rw-r--r--src/listeners/requesttradelistener.h17
-rw-r--r--src/listeners/weightlistener.h9
4 files changed, 31 insertions, 27 deletions
diff --git a/src/listeners/insertcardlistener.h b/src/listeners/insertcardlistener.h
index 2110fdeef..a7c962f96 100644
--- a/src/listeners/insertcardlistener.h
+++ b/src/listeners/insertcardlistener.h
@@ -40,14 +40,15 @@ struct InsertCardListener final : public ActionListener
A_DELETE_COPY(InsertCardListener)
- void action(const ActionEvent &event) override final
- {
- if (event.getId() == "yes" && inventoryHandler)
- inventoryHandler->insertCard(cardIndex, itemIndex);
- }
-
- int cardIndex;
- int itemIndex;
+ public:
+ void action(const ActionEvent &event) override final
+ {
+ if (event.getId() == "yes" && inventoryHandler)
+ inventoryHandler->insertCard(cardIndex, itemIndex);
+ }
+
+ int cardIndex;
+ int itemIndex;
};
#endif // LISTENERS_INSERTCARDLISTENER_H
diff --git a/src/listeners/openurllistener.h b/src/listeners/openurllistener.h
index a6635b89c..e7b275b69 100644
--- a/src/listeners/openurllistener.h
+++ b/src/listeners/openurllistener.h
@@ -39,13 +39,14 @@ struct OpenUrlListener final : public ActionListener
A_DELETE_COPY(OpenUrlListener)
- void action(const ActionEvent &event) override final
- {
- if (event.getId() == "yes")
- openBrowser(url);
- }
-
- std::string url;
+ public:
+ void action(const ActionEvent &event) override final
+ {
+ if (event.getId() == "yes")
+ openBrowser(url);
+ }
+
+ std::string url;
};
#endif // LISTENERS_OPENURLLISTENER_H
diff --git a/src/listeners/requesttradelistener.h b/src/listeners/requesttradelistener.h
index 6e94b96fa..576e22cfb 100644
--- a/src/listeners/requesttradelistener.h
+++ b/src/listeners/requesttradelistener.h
@@ -39,14 +39,15 @@ extern ConfirmDialog *confirmDlg;
*/
struct RequestTradeListener final : public ActionListener
{
- void action(const ActionEvent &event) override final
- {
- confirmDlg = nullptr;
- const std::string &eventId = event.getId();
- if (eventId == "ignore")
- player_relations.ignoreTrade(tradePartnerName);
- tradeHandler->respond(eventId == "yes");
- }
+ public:
+ void action(const ActionEvent &event) override final
+ {
+ confirmDlg = nullptr;
+ const std::string &eventId = event.getId();
+ if (eventId == "ignore")
+ player_relations.ignoreTrade(tradePartnerName);
+ tradeHandler->respond(eventId == "yes");
+ }
};
#endif // LISTENERS_REQUESTTRADELISTENER_H
diff --git a/src/listeners/weightlistener.h b/src/listeners/weightlistener.h
index 46eb86c59..6c2e39335 100644
--- a/src/listeners/weightlistener.h
+++ b/src/listeners/weightlistener.h
@@ -34,10 +34,11 @@ extern OkDialog *weightNotice;
*/
struct WeightListener final : public ActionListener
{
- void action(const ActionEvent &event A_UNUSED) override final
- {
- weightNotice = nullptr;
- }
+ public:
+ void action(const ActionEvent &event A_UNUSED) override final
+ {
+ weightNotice = nullptr;
+ }
};
#endif // LISTENERS_WEIGHTLISTENER_H