diff options
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__format/buffer.h')
| -rw-r--r-- | contrib/llvm-project/libcxx/include/__format/buffer.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/contrib/llvm-project/libcxx/include/__format/buffer.h b/contrib/llvm-project/libcxx/include/__format/buffer.h index 45f9da801722..8aa58d6464bb 100644 --- a/contrib/llvm-project/libcxx/include/__format/buffer.h +++ b/contrib/llvm-project/libcxx/include/__format/buffer.h @@ -95,7 +95,7 @@ public: _LIBCPP_HIDE_FROM_ABI void __copy(basic_string_view<_InCharT> __str) { // When the underlying iterator is a simple iterator the __capacity_ is // infinite. For a string or container back_inserter it isn't. This means - // adding a large string the the buffer can cause some overhead. In that + // that adding a large string to the buffer can cause some overhead. In that // case a better approach could be: // - flush the buffer // - container.append(__str.begin(), __str.end()); @@ -108,7 +108,7 @@ public: __flush_on_overflow(__n); if (__n < __capacity_) { // push_back requires the buffer to have room for at least one character (so use <). - _VSTD::copy_n(__str.data(), __n, _VSTD::addressof(__ptr_[__size_])); + std::copy_n(__str.data(), __n, std::addressof(__ptr_[__size_])); __size_ += __n; return; } @@ -118,8 +118,8 @@ public: _LIBCPP_ASSERT_UNCATEGORIZED(__size_ == 0, "the buffer should be flushed by __flush_on_overflow"); const _InCharT* __first = __str.data(); do { - size_t __chunk = _VSTD::min(__n, __capacity_); - _VSTD::copy_n(__first, __chunk, _VSTD::addressof(__ptr_[__size_])); + size_t __chunk = std::min(__n, __capacity_); + std::copy_n(__first, __chunk, std::addressof(__ptr_[__size_])); __size_ = __chunk; __first += __chunk; __n -= __chunk; @@ -137,7 +137,7 @@ public: size_t __n = static_cast<size_t>(__last - __first); __flush_on_overflow(__n); if (__n < __capacity_) { // push_back requires the buffer to have room for at least one character (so use <). - _VSTD::transform(__first, __last, _VSTD::addressof(__ptr_[__size_]), _VSTD::move(__operation)); + std::transform(__first, __last, std::addressof(__ptr_[__size_]), std::move(__operation)); __size_ += __n; return; } @@ -146,8 +146,8 @@ public: // Transform the data in "__capacity_" sized chunks. _LIBCPP_ASSERT_UNCATEGORIZED(__size_ == 0, "the buffer should be flushed by __flush_on_overflow"); do { - size_t __chunk = _VSTD::min(__n, __capacity_); - _VSTD::transform(__first, __first + __chunk, _VSTD::addressof(__ptr_[__size_]), __operation); + size_t __chunk = std::min(__n, __capacity_); + std::transform(__first, __first + __chunk, std::addressof(__ptr_[__size_]), __operation); __size_ = __chunk; __first += __chunk; __n -= __chunk; @@ -159,7 +159,7 @@ public: _LIBCPP_HIDE_FROM_ABI void __fill(size_t __n, _CharT __value) { __flush_on_overflow(__n); if (__n < __capacity_) { // push_back requires the buffer to have room for at least one character (so use <). - _VSTD::fill_n(_VSTD::addressof(__ptr_[__size_]), __n, __value); + std::fill_n(std::addressof(__ptr_[__size_]), __n, __value); __size_ += __n; return; } @@ -168,8 +168,8 @@ public: // Fill the buffer in "__capacity_" sized chunks. _LIBCPP_ASSERT_UNCATEGORIZED(__size_ == 0, "the buffer should be flushed by __flush_on_overflow"); do { - size_t __chunk = _VSTD::min(__n, __capacity_); - _VSTD::fill_n(_VSTD::addressof(__ptr_[__size_]), __chunk, __value); + size_t __chunk = std::min(__n, __capacity_); + std::fill_n(std::addressof(__ptr_[__size_]), __chunk, __value); __size_ = __chunk; __n -= __chunk; __flush(); @@ -282,7 +282,7 @@ template <class _OutIt, __fmt_char_type _CharT> class _LIBCPP_TEMPLATE_VIS __writer_iterator { public: _LIBCPP_HIDE_FROM_ABI explicit __writer_iterator(_OutIt __out_it) - : __out_it_{_VSTD::move(__out_it)} {} + : __out_it_{std::move(__out_it)} {} _LIBCPP_HIDE_FROM_ABI _OutIt __out_it() && { return std::move(__out_it_); } @@ -359,12 +359,12 @@ requires(output_iterator<_OutIt, const _CharT&>) class _LIBCPP_TEMPLATE_VIS public: _LIBCPP_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it) requires(same_as<_Storage, __internal_storage<_CharT>>) - : __output_(__storage_.__begin(), __storage_.__buffer_size, this), __writer_(_VSTD::move(__out_it)) {} + : __output_(__storage_.__begin(), __storage_.__buffer_size, this), __writer_(std::move(__out_it)) {} _LIBCPP_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it) requires( same_as<_Storage, __direct_storage<_CharT>>) - : __output_(_VSTD::__unwrap_iter(__out_it), size_t(-1), this), - __writer_(_VSTD::move(__out_it)) {} + : __output_(std::__unwrap_iter(__out_it), size_t(-1), this), + __writer_(std::move(__out_it)) {} _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return __output_.__make_output_iterator(); } @@ -372,7 +372,7 @@ public: _LIBCPP_HIDE_FROM_ABI _OutIt __out_it() && { __output_.__flush(); - return _VSTD::move(__writer_).__out_it(); + return std::move(__writer_).__out_it(); } private: @@ -411,11 +411,11 @@ struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base { public: _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __max_size) - : __writer_(_VSTD::move(__out_it)), __max_size_(_VSTD::max(_Size(0), __max_size)) {} + : __writer_(std::move(__out_it)), __max_size_(std::max(_Size(0), __max_size)) {} _LIBCPP_HIDE_FROM_ABI void __flush(_CharT* __ptr, size_t __n) { if (_Size(__size_) <= __max_size_) - __writer_.__flush(__ptr, _VSTD::min(_Size(__n), __max_size_ - __size_)); + __writer_.__flush(__ptr, std::min(_Size(__n), __max_size_ - __size_)); __size_ += __n; } @@ -441,8 +441,8 @@ class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base<_OutIt, _CharT, true> { public: _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __max_size) - : __output_(_VSTD::__unwrap_iter(__out_it), __max_size, this), - __writer_(_VSTD::move(__out_it)), + : __output_(std::__unwrap_iter(__out_it), __max_size, this), + __writer_(std::move(__out_it)), __max_size_(__max_size) { if (__max_size <= 0) [[unlikely]] __output_.__reset(__storage_.__begin(), __storage_.__buffer_size); @@ -466,7 +466,7 @@ public: } else if (__size_ < __max_size_) { // Copies a part of the internal buffer to the output up to n characters. // See __output_buffer<_CharT>::__flush_on_overflow for more information. - _Size __s = _VSTD::min(_Size(__n), __max_size_ - __size_); + _Size __s = std::min(_Size(__n), __max_size_ - __size_); std::copy_n(__ptr, __s, __writer_.__out_it()); __writer_.__flush(__ptr, __s); } @@ -493,12 +493,12 @@ struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer final public: _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer(_OutIt __out_it, _Size __max_size) - : _Base(_VSTD::move(__out_it), __max_size) {} + : _Base(std::move(__out_it), __max_size) {} _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return this->__output_.__make_output_iterator(); } _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __result() && { this->__output_.__flush(); - return {_VSTD::move(this->__writer_).__out_it(), this->__size_}; + return {std::move(this->__writer_).__out_it(), this->__size_}; } }; |
