diff options
Diffstat (limited to 'contrib/libstdc++/include/bits/stl_algo.h')
-rw-r--r-- | contrib/libstdc++/include/bits/stl_algo.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/libstdc++/include/bits/stl_algo.h b/contrib/libstdc++/include/bits/stl_algo.h index 009c409..3d22697 100644 --- a/contrib/libstdc++/include/bits/stl_algo.h +++ b/contrib/libstdc++/include/bits/stl_algo.h @@ -609,7 +609,8 @@ namespace std else { __first = find(__first, __last, __val); while (__first != __last) { - _Integer __n = __count - 1; + typename iterator_traits<_ForwardIter>::difference_type __n = __count; + --__n; _ForwardIter __i = __first; ++__i; while (__i != __last && __n != 0 && *__i == __val) { @@ -661,7 +662,8 @@ namespace std ++__first; } while (__first != __last) { - _Integer __n = __count - 1; + typename iterator_traits<_ForwardIter>::difference_type __n = __count; + --__n; _ForwardIter __i = __first; ++__i; while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) { |