From f6e6b8905be010d7329316cea4546900ad8a2d19 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 29 Apr 2014 21:50:13 +0200 Subject: Use C++14 string_literals --- src/bridge/colors.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/bridge/colors.cpp') diff --git a/src/bridge/colors.cpp b/src/bridge/colors.cpp index 49f7a39..6f6d7a9 100644 --- a/src/bridge/colors.cpp +++ b/src/bridge/colors.cpp @@ -6,6 +6,8 @@ #include +using namespace std::string_literals; + static const char IRC_NUM_COLORS = 16; static const char* irc_colors_to_css[IRC_NUM_COLORS] = { @@ -130,10 +132,10 @@ Xmpp::body irc_format_to_xhtmlim(const std::string& s) if (styles.italic) styles_str += "font-style:italic;"; if (styles.fg != -1) - styles_str += std::string("color:") + + styles_str += "color:"s + irc_colors_to_css[styles.fg % IRC_NUM_COLORS] + ";"; if (styles.bg != -1) - styles_str += std::string("background-color:") + + styles_str += "background-color:"s + irc_colors_to_css[styles.bg % IRC_NUM_COLORS] + ";"; if (!styles_str.empty()) { -- cgit v1.2.3