From 435c12617241fb87225987f2e3f0521cf2dbae75 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 15 Feb 2018 02:10:09 +0300 Subject: Remove unused channel parameter from talk methods. --- src/net/tmwa/chathandler.cpp | 10 ++++------ src/net/tmwa/chathandler.h | 6 ++---- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index 0efc12a27..4acf65ddd 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -52,8 +52,7 @@ ChatHandler::~ChatHandler() chatHandler = nullptr; } -void ChatHandler::talk(const std::string &restrict text, - const std::string &restrict channel A_UNUSED) const +void ChatHandler::talk(const std::string &restrict text) const { if (localPlayer == nullptr) return; @@ -98,7 +97,7 @@ void ChatHandler::channelMessage(const std::string &restrict channel, const std::string &restrict text) const { if (channel == TRADE_CHANNEL) - talk("\302\202" + text, GENERAL_CHANNEL); + talk("\302\202" + text); else if (channel == GM_CHANNEL) Gm::runCommand("wgm", text); } @@ -230,12 +229,11 @@ void ChatHandler::partChannel(const std::string &channel A_UNUSED) const { } -void ChatHandler::talkPet(const std::string &restrict text, - const std::string &restrict channel) const +void ChatHandler::talkPet(const std::string &restrict text) const { // here need string duplication std::string action = strprintf("\302\202\303 %s", text.c_str()); - talk(action, channel); + talk(action); } void ChatHandler::leaveChatRoom() const diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h index 58400b265..ec5fb9bf3 100644 --- a/src/net/tmwa/chathandler.h +++ b/src/net/tmwa/chathandler.h @@ -38,8 +38,7 @@ class ChatHandler final : public Ea::ChatHandler ~ChatHandler() override final; - void talk(const std::string &restrict text, - const std::string &restrict channel) const override final; + void talk(const std::string &restrict text) const override final; void talkRaw(const std::string &text) const override final; @@ -79,8 +78,7 @@ class ChatHandler final : public Ea::ChatHandler void partChannel(const std::string &channel) const override final; - void talkPet(const std::string &restrict text, - const std::string &restrict channel) const override final; + void talkPet(const std::string &restrict text) const override final; void leaveChatRoom() const override final; -- cgit v1.2.3-70-g09d2