51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include <inttypes.h>
#include "config.h"
#if USE_CURSES
#include "version.h"
#include "settings.h"
#include "util/numeric.h"
#include "util/string.h"
+#include "chat_interface.h"
TerminalChatConsole g_term_console;
std::wstring error_message = utf8_to_wide(Logger::getLevelLabel(p.first));
if (!g_settings->getBool("disable_escape_sequences")) {
- error_message = L"\x1b(c@red)" + error_message + L"\x1b(c@white)";
+ error_message = std::wstring(L"\x1b(c@red)").append(error_message)
+ .append(L"\x1b(c@white)");
}
m_chat_backend.addMessage(error_message, utf8_to_wide(p.second));
}
minutes = (float)minutes / 1000 * 60;
if (m_game_time)
- printw(" | Game %d Time of day %02d:%02d ",
+ printw(" | Game %" PRIu64 " Time of day %02d:%02d ",
m_game_time, hours, minutes);
// draw text
const ChatFormattedLine& line = buf.getFormattedLine(row);
if (line.fragments.empty())
continue;
- for (u32 i = 0; i < line.fragments.size(); ++i) {
- const ChatFormattedFragment& fragment = line.fragments[i];
+ for (const ChatFormattedFragment &fragment : line.fragments) {
addstr(wide_to_utf8(fragment.text.getString()).c_str());
}
}