Unverified Commit cbf84017 authored by Ilya Churaev's avatar Ilya Churaev Committed by GitHub

Fixed matcher (#4351)

Co-authored-by: 's avatarSang Ik Lee <sang.ik.lee@intel.com>
parent e5258c0a
...@@ -40,10 +40,18 @@ namespace ngraph ...@@ -40,10 +40,18 @@ namespace ngraph
{ {
if (m_restore) if (m_restore)
{ {
m_matcher->m_matched_list.erase(m_matcher->m_matched_list.begin() + m_watermark, if (!m_matcher->m_matched_list.empty())
m_matcher->m_matched_list.end()); {
m_matcher->m_pattern_value_maps.erase(m_pattern_value_maps.begin() + m_capture_size, m_matcher->m_matched_list.erase(m_matcher->m_matched_list.begin() + m_watermark,
m_pattern_value_maps.end()); m_matcher->m_matched_list.end());
}
if (!m_pattern_value_maps.empty())
{
m_matcher->m_pattern_value_maps.erase(
m_pattern_value_maps.begin() + m_capture_size, m_pattern_value_maps.end());
}
m_matcher->m_pattern_map = m_pattern_value_map; m_matcher->m_pattern_map = m_pattern_value_map;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment