From eafb12b9d0215217d93dbe28c98188c28422c63e Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 2 Dec 2020 19:07:42 +0000 Subject: [PATCH] Dead code removal. --- .../boost/regex/v5/perl_matcher_common.hpp | 57 ------------------- 1 file changed, 57 deletions(-) diff --git a/include/boost/regex/v5/perl_matcher_common.hpp b/include/boost/regex/v5/perl_matcher_common.hpp index fa8c5bdf..78feb8f9 100644 --- a/include/boost/regex/v5/perl_matcher_common.hpp +++ b/include/boost/regex/v5/perl_matcher_common.hpp @@ -912,63 +912,6 @@ bool perl_matcher::find_restart_buf() template bool perl_matcher::find_restart_lit() { -#if 0 - if (position == last) - return false; // can't possibly match if we're at the end already - - unsigned type = (m_match_flags & match_continuous) ? - static_cast(regbase::restart_continue) - : static_cast(re.get_restart_type()); - - const kmp_info* info = access::get_kmp(re); - int len = info->len; - const char_type* x = info->pstr; - int j = 0; - while (position != last) - { - while ((j > -1) && (x[j] != traits_inst.translate(*position, icase))) - j = info->kmp_next[j]; - ++position; - ++j; - if (j >= len) - { - if (type == regbase::restart_fixed_lit) - { - std::advance(position, -j); - restart = position; - std::advance(restart, len); - m_result.set_first(position); - m_result.set_second(restart); - position = restart; - return true; - } - else - { - restart = position; - std::advance(position, -j); - if (match_prefix()) - return true; - else - { - for (int k = 0; (restart != position) && (k < j); ++k, --restart) - { - } // dwa 10/20/2000 - warning suppression for MWCW - if (restart != last) - ++restart; - position = restart; - j = 0; //we could do better than this... - } - } - } - } - if ((m_match_flags & match_partial) && (position == last) && j) - { - // we need to check for a partial match: - restart = position; - std::advance(position, -j); - return match_prefix(); - } -#endif return false; }