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/sift_down.h | |
parent | 6e8c5376d75151b514477715c1b9505d017b83eb (diff) | |
download | ydb-2ec7758a9f5564266f5736c249c02d15d8316246.tar.gz |
intermediate changes
ref:ca7f4ea59c35451f4846b211a4122df6ab12b4df
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h index 6e801b48b4..4d99ff237c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h @@ -38,7 +38,7 @@ __sift_down(_RandomAccessIterator __first, _RandomAccessIterator /*__last*/, __child = 2 * __child + 1; _RandomAccessIterator __child_i = __first + __child; - if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + 1))) { + if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { // right-child exists and is greater than left-child ++__child_i; ++__child; @@ -63,7 +63,7 @@ __sift_down(_RandomAccessIterator __first, _RandomAccessIterator /*__last*/, __child = 2 * __child + 1; __child_i = __first + __child; - if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + 1))) { + if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) { // right-child exists and is greater than left-child ++__child_i; ++__child; |