瀏覽代碼

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

greatbridf 2 年之前
父節點
當前提交
b656c201bf
共有 1 個文件被更改,包括 1 次插入0 次删除
  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