diff --git a/include/boost/regex/v4/basic_regex_creator.hpp b/include/boost/regex/v4/basic_regex_creator.hpp index 1c2c5d90..821fb829 100644 --- a/include/boost/regex/v4/basic_regex_creator.hpp +++ b/include/boost/regex/v4/basic_regex_creator.hpp @@ -344,7 +344,7 @@ re_literal* basic_regex_creator::append_literal(charT c) m_last_state = result = static_cast(getaddress(off)); charT* characters = static_cast(static_cast(result+1)); characters[result->length] = m_traits.translate(c, m_icase); - ++(result->length); + result->length += 1; } return result; } diff --git a/include/boost/regex/v4/basic_regex_parser.hpp b/include/boost/regex/v4/basic_regex_parser.hpp index 4b103f22..27578988 100644 --- a/include/boost/regex/v4/basic_regex_parser.hpp +++ b/include/boost/regex/v4/basic_regex_parser.hpp @@ -971,7 +971,7 @@ bool basic_regex_parser::parse_repeat(std::size_t low, std::size_ // the last state was a literal with more than one character, split it in two: re_literal* lit = static_cast(this->m_last_state); charT c = (static_cast(static_cast(lit+1)))[lit->length - 1]; - --(lit->length); + lit->length -= 1; // now append new state: lit = static_cast(this->append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT))); lit->length = 1;