From 7ae8a11e0e99ab28730a8ca98388a6ec0ea1923e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 24 May 2015 22:04:29 +0300 Subject: Add strong typed bool type TryRemoveColors. --- src/gui/windows/chatwindow.cpp | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'src/gui/windows/chatwindow.cpp') diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 44053c50c..178f41c7e 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -1509,7 +1509,7 @@ bool ChatWindow::resortChatLog(std::string line, ChatMsgType::Type own, const std::string &channel, const IgnoreRecord ignoreRecord, - const bool tryRemoveColors) + const TryRemoveColors tryRemoveColors) { if (own == ChatMsgType::BY_UNKNOWN) { @@ -1537,8 +1537,10 @@ bool ChatWindow::resortChatLog(std::string line, { if (tradeChatTab) { - tradeChatTab->chatLog(prefix + line, own, - ignoreRecord, tryRemoveColors); + tradeChatTab->chatLog(prefix + line, + own, + ignoreRecord, + tryRemoveColors); } return false; } @@ -1600,7 +1602,9 @@ bool ChatWindow::resortChatLog(std::string line, if (tradeChatTab) { line = line.erase(idx + 2, 2); - tradeChatTab->chatLog(prefix + line, own, ignoreRecord, + tradeChatTab->chatLog(prefix + line, + own, + ignoreRecord, tryRemoveColors); } return false; @@ -1620,8 +1624,10 @@ bool ChatWindow::resortChatLog(std::string line, { if (line.find("http", idx1) != idx1 + 2) { - tradeChatTab->chatLog(prefix + line, own, - ignoreRecord, tryRemoveColors); + tradeChatTab->chatLog(prefix + line, + own, + ignoreRecord, + tryRemoveColors); return false; } } @@ -1639,8 +1645,10 @@ bool ChatWindow::resortChatLog(std::string line, } else if (mShowAllLang) { - langChatTab->chatLog(prefix + line, own, - ignoreRecord, tryRemoveColors); + langChatTab->chatLog(prefix + line, + own, + ignoreRecord, + tryRemoveColors); } } else if (serverFeatures->haveChatChannels()) @@ -1650,8 +1658,10 @@ bool ChatWindow::resortChatLog(std::string line, } else if (mShowAllLang) { - localChatTab->chatLog(prefix + line, own, - ignoreRecord, tryRemoveColors); + localChatTab->chatLog(prefix + line, + own, + ignoreRecord, + tryRemoveColors); } } else if (localChatTab && channel.empty()) @@ -1663,7 +1673,7 @@ bool ChatWindow::resortChatLog(std::string line, void ChatWindow::battleChatLog(const std::string &line, ChatMsgType::Type own, const IgnoreRecord ignoreRecord, - const bool tryRemoveColors) + const TryRemoveColors tryRemoveColors) { if (own == ChatMsgType::BY_UNKNOWN) own = ChatMsgType::BY_SERVER; @@ -1677,7 +1687,7 @@ void ChatWindow::channelChatLog(const std::string &channel, const std::string &line, ChatMsgType::Type own, const IgnoreRecord ignoreRecord, - const bool tryRemoveColors) + const TryRemoveColors tryRemoveColors) { std::string tempChannel = channel; toLower(tempChannel); -- cgit v1.2.3-70-g09d2