summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-27 07:45:41 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-27 07:45:41 -0600
commite480ad5d269ca8dcd200397f7e6157b3e46c5c02 (patch)
tree45dba73954b814b5cc9619f873299e3fc8366a67 /src/gui/widgets
parent31c28bbd0349475079ed2111c32b3cd07400554e (diff)
downloadmana-client-e480ad5d269ca8dcd200397f7e6157b3e46c5c02.tar.gz
mana-client-e480ad5d269ca8dcd200397f7e6157b3e46c5c02.tar.bz2
mana-client-e480ad5d269ca8dcd200397f7e6157b3e46c5c02.tar.xz
mana-client-e480ad5d269ca8dcd200397f7e6157b3e46c5c02.zip
Add some const to the chat tabs
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/channeltab.cpp2
-rw-r--r--src/gui/widgets/channeltab.h2
-rw-r--r--src/gui/widgets/chattab.cpp2
-rw-r--r--src/gui/widgets/chattab.h2
-rw-r--r--src/gui/widgets/whispertab.cpp4
-rw-r--r--src/gui/widgets/whispertab.h4
6 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/widgets/channeltab.cpp b/src/gui/widgets/channeltab.cpp
index f8c92a6e..c17aec0a 100644
--- a/src/gui/widgets/channeltab.cpp
+++ b/src/gui/widgets/channeltab.cpp
@@ -63,7 +63,7 @@ ChannelTab::~ChannelTab()
{
}
-void ChannelTab::sendChat(std::string &msg) {
+void ChannelTab::sendChat(const std::string &msg) {
#ifdef TMSERV_SUPPORT
Net::ChatServer::chat(getId(), msg);
#endif
diff --git a/src/gui/widgets/channeltab.h b/src/gui/widgets/channeltab.h
index 91b4f7c6..04a11e29 100644
--- a/src/gui/widgets/channeltab.h
+++ b/src/gui/widgets/channeltab.h
@@ -48,7 +48,7 @@ class ChannelTab : public ChatTab
*/
~ChannelTab();
- void sendChat(std::string &msg);
+ void sendChat(const std::string &msg);
private:
Channel *mChannel;
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index 46116a37..0594761d 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -323,7 +323,7 @@ void ChatTab::sendChat(std::string &msg) {
#endif
}
-void ChatTab::handleCommand(std::string msg)
+void ChatTab::handleCommand(const std::string msg)
{
commandHandler->handleCommand(msg);
}
diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h
index 14c4c130..3e64242c 100644
--- a/src/gui/widgets/chattab.h
+++ b/src/gui/widgets/chattab.h
@@ -108,7 +108,7 @@ class ChatTab : public Tab
virtual void sendChat(std::string &msg);
- virtual void handleCommand(std::string msg);
+ virtual void handleCommand(const std::string msg);
ScrollArea *mScrollArea;
BrowserBox *mTextOutput;
diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp
index 8af8d427..1c63d1c9 100644
--- a/src/gui/widgets/whispertab.cpp
+++ b/src/gui/widgets/whispertab.cpp
@@ -58,7 +58,7 @@ WhisperTab::~WhisperTab()
chatWindow->removeWhisper(mNick);
}
-void WhisperTab::sendChat(std::string &msg) {
+void WhisperTab::sendChat(const std::string &msg) {
if (msg.length() == 0) {
chatLog(_("Cannot send empty chat!"), BY_SERVER, false);
return;
@@ -78,7 +78,7 @@ void WhisperTab::sendChat(std::string &msg) {
msg.c_str()), BY_PLAYER, false);
}
-void WhisperTab::handleCommand(std::string msg)
+void WhisperTab::handleCommand(const std::string msg)
{
if (msg == "close")
delete this;
diff --git a/src/gui/widgets/whispertab.h b/src/gui/widgets/whispertab.h
index 6f9db1ee..1d2f968d 100644
--- a/src/gui/widgets/whispertab.h
+++ b/src/gui/widgets/whispertab.h
@@ -46,9 +46,9 @@ class WhisperTab : public ChatTab
~WhisperTab();
- void sendChat(std::string &msg);
+ void sendChat(const std::string &msg);
- void handleCommand(std::string msg);
+ void handleCommand(const std::string msg);
private:
std::string mNick;