diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-11-02 21:34:25 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-11-02 21:34:25 +0000 |
commit | def501d1cade2b8cd1e1c26b4971abf93ffac9a3 (patch) | |
tree | dc6544ddf86aefb62391dd093fc5e3f1837af059 /libcxx/include/algorithm | |
parent | f6660e24d75a94fbc421bbd58806bd66b14cd2f9 (diff) | |
download | bcm5719-llvm-def501d1cade2b8cd1e1c26b4971abf93ffac9a3.tar.gz bcm5719-llvm-def501d1cade2b8cd1e1c26b4971abf93ffac9a3.zip |
Make reverse() call iter_swap like the standard says, instead of calling swap directly. No real change.
llvm-svn: 251836
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r-- | libcxx/include/algorithm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 908882940b9..9c051198930 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -2330,7 +2330,7 @@ __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, bidirec { if (__first == --__last) break; - swap(*__first, *__last); + _VSTD::iter_swap(__first, __last); ++__first; } } @@ -2342,7 +2342,7 @@ __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, random_ac { if (__first != __last) for (; __first < --__last; ++__first) - swap(*__first, *__last); + _VSTD::iter_swap(__first, __last); } template <class _BidirectionalIterator> |