Sfoglia il codice sorgente

fix(list): return end() when not found

greatbridf 2 anni fa
parent
commit
b656c201bf
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      include/types/list.hpp

+ 1 - 0
include/types/list.hpp

@@ -227,6 +227,7 @@ public:
         for (iterator_type iter = begin(); iter != end(); ++iter)
             if (*iter == v)
                 return iter;
+        return end();
     }
 
     // erase the node which iter points to