From e3d9768a50a3b2b700d65e0cc96e697a5c9d22dc Mon Sep 17 00:00:00 2001 From: Nay Date: Thu, 30 Aug 2012 22:44:33 +0100 Subject: Core: Fix many "errors"/warnings and coding style (3) Game Errors were found using Cppcheck, open-source static analysis tool --- src/server/game/Chat/Chat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/game/Chat') diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index 269ebdd1d2f..d4701b10ce1 100755 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -47,8 +47,8 @@ class ChatHandler { public: WorldSession* GetSession() { return m_session; } - explicit ChatHandler(WorldSession* session) : m_session(session) {} - explicit ChatHandler(Player* player) : m_session(player->GetSession()) {} + explicit ChatHandler(WorldSession* session) : m_session(session), sentErrorMessage(false) {} + explicit ChatHandler(Player* player) : m_session(player->GetSession()), sentErrorMessage(false) {} virtual ~ChatHandler() {} static void FillMessageData(WorldPacket* data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit* speaker); @@ -126,7 +126,7 @@ class ChatHandler bool ShowHelpForCommand(ChatCommand* table, const char* cmd); protected: - explicit ChatHandler() : m_session(NULL) {} // for CLI subclass + explicit ChatHandler() : m_session(NULL), sentErrorMessage(false) {} // for CLI subclass static bool SetDataForCommandInTable(ChatCommand* table, const char* text, uint32 security, std::string const& help, std::string const& fullcommand); bool ExecuteCommandInTable(ChatCommand* table, const char* text, const std::string& fullcmd); bool ShowHelpForSubCommands(ChatCommand* table, char const* cmd, char const* subcmd); -- cgit v1.2.3