Use C++14 string_literals

This commit is contained in:
Florent Le Coz
2014-04-29 21:50:13 +02:00
parent 594bac1e84
commit f6e6b8905b
4 changed files with 22 additions and 15 deletions
+4 -2
View File
@@ -6,6 +6,8 @@
#include <string.h>
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())
{