const ChatLine& ChatBuffer::getLine(u32 index) const
{
- assert(index < getLineCount());
+ assert(index < getLineCount()); // pre-condition
return m_unformatted[index];
}
// 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)
{
std::wstring completion = narrow_to_wide(*i);
if (prefix_start == 0)
- completion += L":";
+ completion += L": ";
completions.push_back(completion);
}
}
}
}
}
- std::wstring replacement = completions[replacement_index] + L" ";
+ std::wstring replacement = completions[replacement_index];
if (word_end < m_line.size() && isspace(word_end))
++word_end;
void ChatBackend::scrollPageUp()
{
- m_console_buffer.scroll(-m_console_buffer.getRows());
+ m_console_buffer.scroll(-(s32)m_console_buffer.getRows());
}