X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fchat.cpp;h=50391d39b0ee8abbfc07fe1ea30bdcf95be6fe90;hb=67997af67fbf7c95e78574f810aa322275b3eb66;hp=1fb872b8527badb4d5fa4ae1696601b84c7d5970;hpb=5b55deb1ebfd55562a6a57fbdbf5dce86015ca86;p=dragonfireclient.git diff --git a/src/chat.cpp b/src/chat.cpp index 1fb872b85..50391d39b 100644 --- a/src/chat.cpp +++ b/src/chat.cpp @@ -83,7 +83,7 @@ u32 ChatBuffer::getScrollback() const const ChatLine& ChatBuffer::getLine(u32 index) const { - assert(index < getLineCount()); + assert(index < getLineCount()); // pre-condition return m_unformatted[index]; } @@ -107,7 +107,8 @@ void ChatBuffer::deleteOldest(u32 count) // keep m_formatted in sync if (del_formatted < m_formatted.size()) { - assert(m_formatted[del_formatted].first); + + sanity_check(m_formatted[del_formatted].first); ++del_formatted; while (del_formatted < m_formatted.size() && !m_formatted[del_formatted].first) @@ -510,7 +511,7 @@ void ChatPrompt::nickCompletion(const std::list& names, bool backwa { std::wstring completion = narrow_to_wide(*i); if (prefix_start == 0) - completion += L":"; + completion += L": "; completions.push_back(completion); } } @@ -540,7 +541,7 @@ void ChatPrompt::nickCompletion(const std::list& names, bool backwa } } } - std::wstring replacement = completions[replacement_index] + L" "; + std::wstring replacement = completions[replacement_index]; if (word_end < m_line.size() && isspace(word_end)) ++word_end;