ソースを参照

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