diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-27 12:35:09 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-27 12:35:09 +0100 |
commit | 05e753294c1a603252d2eed4b1731c3f50543a7e (patch) | |
tree | 82d8c04a55df7a689fd15b69e8e6917c91e165d0 /src/gui/chat.cpp | |
parent | 38674a7732d2224e07e80c0c4224e3468e4ddfb0 (diff) | |
download | mana-05e753294c1a603252d2eed4b1731c3f50543a7e.tar.gz mana-05e753294c1a603252d2eed4b1731c3f50543a7e.tar.bz2 mana-05e753294c1a603252d2eed4b1731c3f50543a7e.tar.xz mana-05e753294c1a603252d2eed4b1731c3f50543a7e.zip |
Fixed some compiler warnings
Fixed a faulty == statement that should have been an assignment and a
mismatched 'else' block.
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 8baf702e..7861bdb6 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -19,24 +19,25 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <guichan/focushandler.hpp> - #include "chat.h" -#include "chatinput.h" -#include "itemlinkhandler.h" -#include "recorder.h" -#include "scrollarea.h" -#include "sdlinput.h" -#include "widgets/tabbedarea.h" -#include "widgets/whispertab.h" +#include "gui/chatinput.h" +#include "gui/itemlinkhandler.h" +#include "gui/recorder.h" +#include "gui/scrollarea.h" +#include "gui/sdlinput.h" -#include "../beingmanager.h" -#include "../configuration.h" -#include "../localplayer.h" +#include "gui/widgets/tabbedarea.h" +#include "gui/widgets/whispertab.h" -#include "../utils/dtor.h" -#include "../utils/stringutils.h" +#include "beingmanager.h" +#include "configuration.h" +#include "localplayer.h" + +#include "utils/dtor.h" +#include "utils/stringutils.h" + +#include <guichan/focushandler.hpp> #ifdef TMWSERV_SUPPORT ChatWindow::ChatWindow(): @@ -140,20 +141,21 @@ void ChatWindow::logic() Window::logic(); Tab *tab = getFocused(); - if (tab != currentTab) { - currentTab == tab; + if (tab != mCurrentTab) { + mCurrentTab = tab; adjustTabSize(); } } -ChatTab* ChatWindow::getFocused() const +ChatTab *ChatWindow::getFocused() const { return dynamic_cast<ChatTab*>(mChatTabs->getSelectedTab()); } -void ChatWindow::clearTab(ChatTab* tab) +void ChatWindow::clearTab(ChatTab *tab) { - if (tab) tab->clearText(); + if (tab) + tab->clearText(); } void ChatWindow::clearTab() @@ -373,11 +375,8 @@ void ChatWindow::whisper(std::string nick, std::string mes, bool own) toLower(playerName); toLower(tempNick); - if (tempNick.compare(playerName) == 0) - if (own) - ; - else - return; + if (!own && tempNick.compare(playerName) == 0) + return; ChatTab *tab = mWhispers[tempNick]; |