TIL std::string::end and std::string::begin…

This commit is contained in:
Florent Le Coz
2015-09-23 19:11:48 +02:00
parent 2380a84ba5
commit 60d340be19
+1 -2
View File
@@ -264,8 +264,7 @@ void ConfigureIrcServerStep2(XmppComponent*, AdhocSession& session, XmlNode& com
{
auto username = value->get_inner();
// The username must not contain spaces
std::replace(&username[0], &username[username.size() - 1],
' ', '_');
std::replace(username.begin(), username.end(), ' ', '_');
options.username = username;
}