diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-12-25 01:17:55 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-12-26 13:37:37 +0300 |
commit | fbd86a218a4477fb505aff76713f3bd75d683a38 (patch) | |
tree | e07e4660f5d472e67d9f92470a6918aa99fc589e | |
parent | ab5180c94f87486072c451055cf289413596c22f (diff) |
Adapt regex to digit(wchar_t) added to libbutl
-rw-r--r-- | build2/test/script/regex.cxx | 3 | ||||
-rw-r--r-- | build2/test/script/regex.hxx | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/build2/test/script/regex.cxx b/build2/test/script/regex.cxx index fe8bcb0..5e14e6e 100644 --- a/build2/test/script/regex.cxx +++ b/build2/test/script/regex.cxx @@ -341,7 +341,8 @@ namespace std { const char_type& c (*b++); - *m++ = c.type () == line_type::special && build2::digit (c.special ()) + *m++ = c.type () == line_type::special && c.special () >= 0 && + build2::digit (static_cast<char> (c.special ())) ? digit : 0; } diff --git a/build2/test/script/regex.hxx b/build2/test/script/regex.hxx index c8c3877..a3a0d2d 100644 --- a/build2/test/script/regex.hxx +++ b/build2/test/script/regex.hxx @@ -462,7 +462,8 @@ namespace std is (mask m, char_type c) const { return m == - (c.type () == line_type::special && build2::digit (c.special ()) + (c.type () == line_type::special && c.special () >= 0 && + build2::digit (static_cast<char> (c.special ())) ? digit : 0); } |