Cleanup: Don't use string literals when character literals are needed

This commit is contained in:
Paul Beckingham
2016-10-14 23:11:28 -04:00
parent 35e518cbc2
commit 814d7d69fa
27 changed files with 122 additions and 122 deletions

View File

@@ -72,9 +72,9 @@ std::string Msg::serialize () const
{
std::string output;
for (auto& i : _header)
output += i.first + ": " + i.second + "\n";
output += i.first + ": " + i.second + '\n';
output += "\n" + _payload + "\n";
output += '\n' + _payload + '\n';
return output;
}
@@ -95,7 +95,7 @@ bool Msg::parse (const std::string& input)
{
auto delimiter = i.find (':');
if (delimiter == std::string::npos)
throw std::string ("ERROR: Malformed message header '") + i + "'";
throw std::string ("ERROR: Malformed message header '") + i + '\'';
_header[Lexer::trim (i.substr (0, delimiter))] = Lexer::trim (i.substr (delimiter + 1));
}