diff -r 2e7225dbd9b2 -r e254398fcc7c sources/interface.cpp --- a/sources/interface.cpp Wed Jan 27 13:08:51 2021 +0200 +++ b/sources/interface.cpp Wed Jan 27 13:17:11 2021 +0200 @@ -167,7 +167,7 @@ m_inputHistory.clear(); m_inputHistory.push_back(""); m_outputLines.clear(); - m_outputLines << ColoredLine(); + m_outputLines.push_back(ColoredLine()); m_session.setInterface(this); resetTitle(); @@ -304,7 +304,7 @@ if (m_outputLines.size() == 1) return; - m_outputScroll = clamp(m_outputScroll, 0, m_outputLines.size() - 1); + m_outputScroll = clamp(m_outputScroll, 0, static_cast(m_outputLines.size() - 1)); int height = LINES - 3; int width = COLS - nicklistWidth(); @@ -334,7 +334,7 @@ // See if there's any more rows to use(end may be too small) if (not tightFit) { - while (end < m_outputLines.size()) + while (end < static_cast(m_outputLines.size())) { int rows = m_outputLines[end].rows(width); @@ -963,12 +963,12 @@ { if (ch == '\n') { - m_outputLines.last().finalize(); - m_outputLines << ColoredLine(); + zfc::last(m_outputLines).finalize(); + m_outputLines.push_back({}); continue; } - if (m_outputLines.last().length() == 0) + if (zfc::last(m_outputLines).length() == 0) { time_t now; time(&now); @@ -976,14 +976,14 @@ strftime(timestamp, sizeof timestamp, "[%H:%M:%S] ", localtime(&now)); for (char ch : String(timestamp)) - m_outputLines.last().addChar(ch); + zfc::last(m_outputLines).addChar(ch); } // Remove some lines if there's too many of them. 20,000 should be enough, I hope. while (m_outputLines.size() > 20000) - m_outputLines.remove_at(0); + m_outputLines.erase(m_outputLines.begin()); - m_outputLines.last().addChar(ch); + zfc::last(m_outputLines).addChar(ch); } m_needOutputRender = true;