Merge pull request #80 from jbeich/boost

Unbreak build against Boost 1.68
This commit is contained in:
Thomas Goyne 2018-07-09 15:06:51 -07:00 committed by GitHub
commit 524c6114a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -253,7 +253,7 @@ bool SearchReplaceEngine::ReplaceAll() {
if (MatchState ms = matches(&diag, 0)) { if (MatchState ms = matches(&diag, 0)) {
auto& diag_field = diag.*get_dialogue_field(settings.field); auto& diag_field = diag.*get_dialogue_field(settings.field);
std::string const& text = diag_field.get(); std::string const& text = diag_field.get();
count += distance( count += std::distance(
boost::u32regex_iterator<std::string::const_iterator>(begin(text), end(text), *ms.re), boost::u32regex_iterator<std::string::const_iterator>(begin(text), end(text), *ms.re),
boost::u32regex_iterator<std::string::const_iterator>()); boost::u32regex_iterator<std::string::const_iterator>());
diag_field = u32regex_replace(text, *ms.re, settings.replace_with); diag_field = u32regex_replace(text, *ms.re, settings.replace_with);