diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-10-23 17:00:42 +0800 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-11-01 14:05:15 +0800 |
| commit | 2d901dc76fc9a6c49f14a982d3afd13626ef3445 (patch) | |
| tree | 448c864653921b94aec0966b3647384ee35aed5c /src | |
| parent | f07375fb273114da20657699d872e46b72069853 (diff) | |
Regex: slight readability improvement and workaround a potential gcc bug
Diffstat (limited to 'src')
| -rw-r--r-- | src/regex_impl.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/regex_impl.hh b/src/regex_impl.hh index 5ee1b24b..7a73526c 100644 --- a/src/regex_impl.hh +++ b/src/regex_impl.hh @@ -449,10 +449,11 @@ private: { if (pos == (look_direction == MatchDirection::Forward ? m_end : m_begin)) return false; - auto cp = (look_direction == MatchDirection::Forward ? *pos : *(pos-1)), ref = *it; + Codepoint cp = (look_direction == MatchDirection::Forward ? *pos : *(pos-1)); if (ignore_case) cp = to_lower(cp); + const Codepoint ref = *it; if (ref == 0xF000) {} // any character matches else if (ref > 0xF0000 and ref <= 0xFFFFD) |
