diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-12-01 20:21:04 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-12-01 20:21:04 +0000 |
commit | ec3773c2dadbeadfc5def927116c2ee9d9c53066 (patch) | |
tree | 556cfdc9a9d1d6cb484a88a2771ed9c92c13037a /include/string | |
parent | 9996844df0f22a68a1af6d30c611be1f1ebf1486 (diff) | |
download | external_libcxx-ec3773c2dadbeadfc5def927116c2ee9d9c53066.tar.gz external_libcxx-ec3773c2dadbeadfc5def927116c2ee9d9c53066.tar.bz2 external_libcxx-ec3773c2dadbeadfc5def927116c2ee9d9c53066.zip |
Quash a whole bunch of warnings
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145624 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/string')
-rw-r--r-- | include/string | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/include/string b/include/string index 344bb5514..575b9e15e 100644 --- a/include/string +++ b/include/string @@ -1079,7 +1079,7 @@ private: enum {__long_mask = ~(size_type(~0) >> 1)}; #else // _LIBCPP_BIG_ENDIAN enum {__short_mask = 0x01}; - enum {__long_mask = 0x1}; + enum {__long_mask = 0x1ul}; #endif // _LIBCPP_BIG_ENDIAN enum {__mask = size_type(~0) >> 1}; @@ -1501,7 +1501,7 @@ private: {__r_.first().__l.__cap_ = __long_mask | __s;} _LIBCPP_INLINE_VISIBILITY size_type __get_long_cap() const _NOEXCEPT - {return __r_.first().__l.__cap_ & ~__long_mask;} + {return __r_.first().__l.__cap_ & size_type(~__long_mask);} _LIBCPP_INLINE_VISIBILITY void __set_long_pointer(pointer __p) _NOEXCEPT @@ -1591,7 +1591,7 @@ private: } _LIBCPP_INLINE_VISIBILITY - void __copy_assign_alloc(const basic_string& __str, false_type) _NOEXCEPT + void __copy_assign_alloc(const basic_string&, false_type) _NOEXCEPT {} #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES @@ -1619,7 +1619,7 @@ private: } _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(basic_string& __c, false_type) + void __move_assign_alloc(basic_string&, false_type) _NOEXCEPT {} @@ -1638,7 +1638,7 @@ private: swap(__x, __y); } _LIBCPP_INLINE_VISIBILITY - static void __swap_alloc(allocator_type& __x, allocator_type& __y, false_type) _NOEXCEPT + static void __swap_alloc(allocator_type&, allocator_type&, false_type) _NOEXCEPT {} _LIBCPP_INLINE_VISIBILITY void __invalidate_all_iterators(); @@ -1669,7 +1669,11 @@ template <class _CharT, class _Traits, class _Allocator> _LIBCPP_INLINE_VISIBILITY inline #endif void -basic_string<_CharT, _Traits, _Allocator>::__invalidate_iterators_past(size_type __pos) +basic_string<_CharT, _Traits, _Allocator>::__invalidate_iterators_past(size_type +#ifdef _LIBCPP_DEBUG + __pos +#endif + ) { #ifdef _LIBCPP_DEBUG const_iterator __beg = begin(); @@ -2785,7 +2789,7 @@ basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __pos) iterator __b = begin(); size_type __r = static_cast<size_type>(__pos - __b); erase(__r, 1); - return __b + __r; + return __b + static_cast<difference_type>(__r); } template <class _CharT, class _Traits, class _Allocator> @@ -2796,7 +2800,7 @@ basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __first, const_i iterator __b = begin(); size_type __r = static_cast<size_type>(__first - __b); erase(__r, static_cast<size_type>(__last - __first)); - return __b + __r; + return __b + static_cast<difference_type>(__r); } template <class _CharT, class _Traits, class _Allocator> @@ -3483,7 +3487,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1, template <class _CharT, class _Traits, class _Allocator> int -basic_string<_CharT, _Traits, _Allocator>::compare(const_pointer __s) const +basic_string<_CharT, _Traits, _Allocator>::compare(const_pointer __s) const _NOEXCEPT { #ifdef _LIBCPP_DEBUG assert(__s != 0); |