summaryrefslogtreecommitdiffstats
path: root/libcxx/include/deque
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-12-24 00:24:44 +0000
committerEric Fiselier <eric@efcs.ca>2016-12-24 00:24:44 +0000
commitaec0878403f76efcbb84ca6155adb1c54945853e (patch)
tree8402d6b3e0feb690c18dc58d34d583db4b6ddcaa /libcxx/include/deque
parent8a6a86146c9f516416256271e35c36c2a7ddc212 (diff)
downloadbcm5719-llvm-aec0878403f76efcbb84ca6155adb1c54945853e.tar.gz
bcm5719-llvm-aec0878403f76efcbb84ca6155adb1c54945853e.zip
fix sign comparison warnings
llvm-svn: 290469
Diffstat (limited to 'libcxx/include/deque')
-rw-r--r--libcxx/include/deque4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/deque b/libcxx/include/deque
index f8e0bb870de..ed62edd3b3c 100644
--- a/libcxx/include/deque
+++ b/libcxx/include/deque
@@ -2735,7 +2735,7 @@ deque<_Tp, _Allocator>::erase(const_iterator __f)
difference_type __pos = __f - __b;
iterator __p = __b + __pos;
allocator_type& __a = __base::__alloc();
- if (__pos <= (__base::size() - 1) / 2)
+ if (static_cast<size_t>(__pos) <= (__base::size() - 1) / 2)
{ // erase from front
_VSTD::move_backward(__b, __p, _VSTD::next(__p));
__alloc_traits::destroy(__a, _VSTD::addressof(*__b));
@@ -2773,7 +2773,7 @@ deque<_Tp, _Allocator>::erase(const_iterator __f, const_iterator __l)
if (__n > 0)
{
allocator_type& __a = __base::__alloc();
- if (__pos <= (__base::size() - __n) / 2)
+ if (static_cast<size_t>(__pos) <= (__base::size() - __n) / 2)
{ // erase from front
iterator __i = _VSTD::move_backward(__b, __p, __p + __n);
for (; __b != __i; ++__b)
OpenPOWER on IntegriCloud