From ecd8811f15034a6c895a81c0153a4b154dbc1061 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 31 May 2013 00:55:36 +0300 Subject: Improve chattab class. --- src/net/ea/gui/guildtab.cpp | 4 ++-- src/net/ea/gui/guildtab.h | 4 ++-- src/net/ea/gui/partytab.cpp | 4 ++-- src/net/ea/gui/partytab.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/net') diff --git a/src/net/ea/gui/guildtab.cpp b/src/net/ea/gui/guildtab.cpp index aa89309b1..38a384629 100644 --- a/src/net/ea/gui/guildtab.cpp +++ b/src/net/ea/gui/guildtab.cpp @@ -158,13 +158,13 @@ void GuildTab::getAutoCompleteList(StringVect &names) const names.push_back("/notice "); } -void GuildTab::saveToLogFile(std::string &msg) +void GuildTab::saveToLogFile(const std::string &msg) { if (chatLogger) chatLogger->log("#Guild", msg); } -void GuildTab::playNewMessageSound() +void GuildTab::playNewMessageSound() const { soundManager.playGuiSound(SOUND_GUILD); } diff --git a/src/net/ea/gui/guildtab.h b/src/net/ea/gui/guildtab.h index 28b689f79..1fe57437d 100644 --- a/src/net/ea/gui/guildtab.h +++ b/src/net/ea/gui/guildtab.h @@ -45,12 +45,12 @@ class GuildTab : public ChatTab, public ConfigListener void showHelp() override; - void saveToLogFile(std::string &msg) override; + void saveToLogFile(const std::string &msg) override; int getType() const override A_WARN_UNUSED { return ChatTab::TAB_GUILD; } - void playNewMessageSound() override; + void playNewMessageSound() const override; void optionChanged(const std::string &value) override; diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp index 5b3184038..78105d3ad 100644 --- a/src/net/ea/gui/partytab.cpp +++ b/src/net/ea/gui/partytab.cpp @@ -274,13 +274,13 @@ void PartyTab::getAutoCompleteList(StringVect &names) const p->getNames(names); } -void PartyTab::saveToLogFile(std::string &msg) +void PartyTab::saveToLogFile(const std::string &msg) { if (chatLogger) chatLogger->log("#Party", msg); } -void PartyTab::playNewMessageSound() +void PartyTab::playNewMessageSound() const { soundManager.playGuiSound(SOUND_GUILD); } diff --git a/src/net/ea/gui/partytab.h b/src/net/ea/gui/partytab.h index 983e6efb2..16c9e8a3f 100644 --- a/src/net/ea/gui/partytab.h +++ b/src/net/ea/gui/partytab.h @@ -48,9 +48,9 @@ class PartyTab : public ChatTab int getType() const override A_WARN_UNUSED { return ChatTab::TAB_PARTY; } - void saveToLogFile(std::string &msg) override; + void saveToLogFile(const std::string &msg) override; - void playNewMessageSound() override; + void playNewMessageSound() const override; protected: void handleInput(const std::string &msg) override; -- cgit v1.2.3-70-g09d2