summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/whispertab.cpp5
-rw-r--r--src/gui/widgets/whispertab.h11
2 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp
index b67b74f8..ba469c00 100644
--- a/src/gui/widgets/whispertab.cpp
+++ b/src/gui/widgets/whispertab.cpp
@@ -47,8 +47,9 @@
#include "../../utils/strprintf.h"
#include "../../utils/stringutils.h"
-WhisperTab::WhisperTab(std::string nick) : ChatTab(nick),
- mNick(nick)
+WhisperTab::WhisperTab(const std::string &nick) :
+ ChatTab(nick),
+ mNick(nick)
{
}
diff --git a/src/gui/widgets/whispertab.h b/src/gui/widgets/whispertab.h
index 059346fa..e3ebf0f3 100644
--- a/src/gui/widgets/whispertab.h
+++ b/src/gui/widgets/whispertab.h
@@ -27,24 +27,23 @@
class Channel;
/**
- * A tab for whispers from a single nick.
+ * A tab for whispers from a single player.
*/
class WhisperTab : public ChatTab
{
public:
- std::string getNick() { return mNick; }
+ const std::string &getNick() const { return mNick; }
protected:
friend class ChatWindow;
/**
* Constructor.
+ *
+ * @param nick the name of the player this tab is whispering to
*/
- WhisperTab(std::string nick);
+ WhisperTab(const std::string &nick);
- /**
- * Destructor.
- */
~WhisperTab();
void sendChat(std::string &msg);