Explorar o código

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

greatbridf %!s(int64=2) %!d(string=hai) anos
pai
achega
b656c201bf
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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