diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-03-01 14:07:11 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-03-01 14:07:11 +0300 |
commit | 2ec7758a9f5564266f5736c249c02d15d8316246 (patch) | |
tree | 5fa4cc3fb88d1a1aca0cb65d7e0eb0c710f358ce /contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h | |
parent | 6e8c5376d75151b514477715c1b9505d017b83eb (diff) | |
download | ydb-2ec7758a9f5564266f5736c249c02d15d8316246.tar.gz |
intermediate changes
ref:ca7f4ea59c35451f4846b211a4122df6ab12b4df
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h index 367a5bf1c8..cfaec0ed1e 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h @@ -68,7 +68,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, _Rando const _D1 __len1 = __last1 - __first1; if (__len1 < __len2) return _VSTD::make_pair(__last1, __last1); - const _RandomAccessIterator1 __s = __last1 - (__len2 - 1); // Start of pattern match can't go beyond here + const _RandomAccessIterator1 __s = __last1 - _D1(__len2 - 1); // Start of pattern match can't go beyond here while (true) { while (true) { @@ -83,7 +83,7 @@ __search(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, _Rando _RandomAccessIterator2 __m2 = __first2; while (true) { if (++__m2 == __last2) - return _VSTD::make_pair(__first1, __first1 + __len2); + return _VSTD::make_pair(__first1, __first1 + _D1(__len2)); ++__m1; // no need to check range on __m1 because __s guarantees we have enough source if (!__pred(*__m1, *__m2)) { ++__first1; |