]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/include/bits/regex_automaton.tcc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / include / bits / regex_automaton.tcc
index 6955ab9203802f5c076e25bae9233c50810dc78e..0977f77892280e136a4f46a871309e13e76dab69 100644 (file)
@@ -1,6 +1,6 @@
 // class template regex -*- C++ -*-
 
-// Copyright (C) 2013-2016 Free Software Foundation, Inc.
+// Copyright (C) 2013-2021 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
 
 namespace std _GLIBCXX_VISIBILITY(default)
 {
-namespace __detail
-{
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
+namespace __detail
+{
 #ifdef _GLIBCXX_DEBUG
   inline std::ostream&
   _State_base::_M_print(std::ostream& ostr) const
@@ -220,20 +220,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
          auto __v = __it.second;
          auto& __ref = _M_nfa[__v];
          if (__ref._M_next != _S_invalid_state_id)
-           {
-             __glibcxx_assert(__m.count(__ref._M_next) > 0);
-             __ref._M_next = __m[__ref._M_next];
-           }
-         if (__ref._M_has_alt())
-           if (__ref._M_alt != _S_invalid_state_id)
-             {
-               __glibcxx_assert(__m.count(__ref._M_alt) > 0);
-               __ref._M_alt = __m[__ref._M_alt];
-             }
+           __ref._M_next = __m.find(__ref._M_next)->second;
+         if (__ref._M_has_alt() && __ref._M_alt != _S_invalid_state_id)
+           __ref._M_alt = __m.find(__ref._M_alt)->second;
        }
       return _StateSeq(_M_nfa, __m[_M_start], __m[_M_end]);
     }
+} // namespace __detail
 
 _GLIBCXX_END_NAMESPACE_VERSION
-} // namespace __detail
 } // namespace