Cleanup: Don't use string literals when character literals are needed
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user