소스 검색

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