diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-04-12 19:16:55 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-04-12 19:16:55 +0200 |
| commit | 385241d2c07b6e97c7bd25b4d31a9845a1c74154 (patch) | |
| tree | 5ee85dd079fb374f9e318675370d74dfda96c84e /src/command_manager.cc | |
| parent | b6d21514e4217ee811682338e4ccf4fab5477cd6 (diff) | |
remove String::replace, use boost::regex_replace directly
Diffstat (limited to 'src/command_manager.cc')
| -rw-r--r-- | src/command_manager.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/command_manager.cc b/src/command_manager.cc index 33c7cf2f..87848860 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -201,7 +201,8 @@ TokenList parse(const String& line, if (opt_token_pos_info) opt_token_pos_info->push_back({token_start, pos}); String token = line.substr(token_start, pos - token_start); - token = token.replace(R"(\\([ \t;\n]))", "\\1"); + static const Regex regex{R"(\\([ \t;\n]))"}; + token = boost::regex_replace(token, regex, "\\1"); result.push_back({type, token}); } |
