[NFC][libc++] Consistently use spaces to indent
rdar://problem/19988944 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338933 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1488,7 +1488,7 @@ private:
|
||||
void __copy_assign_alloc(const __tree& __t, true_type)
|
||||
{
|
||||
if (__node_alloc() != __t.__node_alloc())
|
||||
clear();
|
||||
clear();
|
||||
__node_alloc() = __t.__node_alloc();
|
||||
}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
|
||||
@@ -110,7 +110,7 @@ void __throw_bad_any_cast()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw bad_any_cast();
|
||||
#else
|
||||
_VSTD::abort();
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -238,9 +238,9 @@ __bitset<_N_words, _Size>::__init(unsigned long long __v, false_type) _NOEXCEPT
|
||||
size_t __sz = _Size;
|
||||
for (size_t __i = 0; __i < sizeof(__t)/sizeof(__t[0]); ++__i, __v >>= __bits_per_word, __sz -= __bits_per_word )
|
||||
if ( __sz < __bits_per_word)
|
||||
__t[__i] = static_cast<__storage_type>(__v) & ( 1ULL << __sz ) - 1;
|
||||
__t[__i] = static_cast<__storage_type>(__v) & ( 1ULL << __sz ) - 1;
|
||||
else
|
||||
__t[__i] = static_cast<__storage_type>(__v);
|
||||
__t[__i] = static_cast<__storage_type>(__v);
|
||||
|
||||
_VSTD::copy(__t, __t + sizeof(__t)/sizeof(__t[0]), __first_);
|
||||
_VSTD::fill(__first_ + sizeof(__t)/sizeof(__t[0]), __first_ + sizeof(__first_)/sizeof(__first_[0]),
|
||||
@@ -254,7 +254,7 @@ __bitset<_N_words, _Size>::__init(unsigned long long __v, true_type) _NOEXCEPT
|
||||
{
|
||||
__first_[0] = __v;
|
||||
if (_Size < __bits_per_word)
|
||||
__first_[0] &= ( 1ULL << _Size ) - 1;
|
||||
__first_[0] &= ( 1ULL << _Size ) - 1;
|
||||
|
||||
_VSTD::fill(__first_ + 1, __first_ + sizeof(__first_)/sizeof(__first_[0]), __storage_type(0));
|
||||
}
|
||||
@@ -270,8 +270,8 @@ __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
|
||||
: __first_{__v}
|
||||
#elif __SIZEOF_SIZE_T__ == 4
|
||||
: __first_{static_cast<__storage_type>(__v),
|
||||
_Size >= 2 * __bits_per_word ? static_cast<__storage_type>(__v >> __bits_per_word)
|
||||
: static_cast<__storage_type>((__v >> __bits_per_word) & (__storage_type(1) << (_Size - __bits_per_word)) - 1)}
|
||||
_Size >= 2 * __bits_per_word ? static_cast<__storage_type>(__v >> __bits_per_word)
|
||||
: static_cast<__storage_type>((__v >> __bits_per_word) & (__storage_type(1) << (_Size - __bits_per_word)) - 1)}
|
||||
#else
|
||||
#error This constructor has not been ported to this platform
|
||||
#endif
|
||||
|
||||
@@ -746,7 +746,7 @@ unspecified
|
||||
parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp,
|
||||
basic_string<charT, traits, Alloc>& abbrev, minutes& offset);
|
||||
|
||||
inline constexpr last_spec last{}; // C++20
|
||||
inline constexpr last_spec last{}; // C++20
|
||||
inline constexpr chrono::weekday Sunday{0}; // C++20
|
||||
inline constexpr chrono::weekday Monday{1}; // C++20
|
||||
inline constexpr chrono::weekday Tuesday{2}; // C++20
|
||||
|
||||
@@ -66,10 +66,10 @@ enum class byte : unsigned char {};
|
||||
|
||||
constexpr byte operator| (byte __lhs, byte __rhs) noexcept
|
||||
{
|
||||
return static_cast<byte>(
|
||||
static_cast<unsigned char>(
|
||||
static_cast<unsigned int>(__lhs) | static_cast<unsigned int>(__rhs)
|
||||
));
|
||||
return static_cast<byte>(
|
||||
static_cast<unsigned char>(
|
||||
static_cast<unsigned int>(__lhs) | static_cast<unsigned int>(__rhs)
|
||||
));
|
||||
}
|
||||
|
||||
constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
|
||||
@@ -77,10 +77,10 @@ constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
|
||||
|
||||
constexpr byte operator& (byte __lhs, byte __rhs) noexcept
|
||||
{
|
||||
return static_cast<byte>(
|
||||
static_cast<unsigned char>(
|
||||
static_cast<unsigned int>(__lhs) & static_cast<unsigned int>(__rhs)
|
||||
));
|
||||
return static_cast<byte>(
|
||||
static_cast<unsigned char>(
|
||||
static_cast<unsigned int>(__lhs) & static_cast<unsigned int>(__rhs)
|
||||
));
|
||||
}
|
||||
|
||||
constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
|
||||
@@ -88,10 +88,10 @@ constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
|
||||
|
||||
constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
|
||||
{
|
||||
return static_cast<byte>(
|
||||
static_cast<unsigned char>(
|
||||
static_cast<unsigned int>(__lhs) ^ static_cast<unsigned int>(__rhs)
|
||||
));
|
||||
return static_cast<byte>(
|
||||
static_cast<unsigned char>(
|
||||
static_cast<unsigned int>(__lhs) ^ static_cast<unsigned int>(__rhs)
|
||||
));
|
||||
}
|
||||
|
||||
constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
|
||||
|
||||
@@ -1405,7 +1405,7 @@ void __throw_bad_function_call()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw bad_function_call();
|
||||
#else
|
||||
_VSTD::abort();
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ void __throw_bad_array_length()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw bad_array_length();
|
||||
#else
|
||||
_VSTD::abort();
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -104,15 +104,15 @@ template<class InputIterator, class OutputIterator, class T,
|
||||
|
||||
template<class InputIterator, class OutputIterator,
|
||||
class BinaryOperation, class UnaryOperation>
|
||||
OutputIterator
|
||||
transform_inclusive_scan(InputIterator first, InputIterator last,
|
||||
OutputIterator
|
||||
transform_inclusive_scan(InputIterator first, InputIterator last,
|
||||
OutputIterator result,
|
||||
BinaryOperation binary_op, UnaryOperation unary_op); // C++17
|
||||
|
||||
template<class InputIterator, class OutputIterator,
|
||||
class BinaryOperation, class UnaryOperation, class T>
|
||||
OutputIterator
|
||||
transform_inclusive_scan(InputIterator first, InputIterator last,
|
||||
OutputIterator
|
||||
transform_inclusive_scan(InputIterator first, InputIterator last,
|
||||
OutputIterator result,
|
||||
BinaryOperation binary_op, UnaryOperation unary_op,
|
||||
T init); // C++17
|
||||
|
||||
20
include/span
20
include/span
@@ -194,8 +194,8 @@ struct __is_span_compatible_container<_Tp, _ElementType,
|
||||
decltype(size(declval<_Tp>())),
|
||||
// remove_pointer_t<decltype(data(cont))>(*)[] is convertible to ElementType(*)[]
|
||||
typename enable_if<
|
||||
is_convertible_v<remove_pointer_t<decltype(data(declval<_Tp &>()))>(*)[],
|
||||
_ElementType(*)[]>,
|
||||
is_convertible_v<remove_pointer_t<decltype(data(declval<_Tp &>()))>(*)[],
|
||||
_ElementType(*)[]>,
|
||||
nullptr_t>::type
|
||||
>>
|
||||
: public true_type {};
|
||||
@@ -331,14 +331,14 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](index_type __idx) const noexcept
|
||||
{
|
||||
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T,N>[] index out of bounds");
|
||||
return __data[__idx];
|
||||
}
|
||||
return __data[__idx];
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY constexpr reference operator()(index_type __idx) const noexcept
|
||||
{
|
||||
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T,N>() index out of bounds");
|
||||
return __data[__idx];
|
||||
}
|
||||
return __data[__idx];
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data; }
|
||||
|
||||
@@ -496,14 +496,14 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](index_type __idx) const noexcept
|
||||
{
|
||||
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T>[] index out of bounds");
|
||||
return __data[__idx];
|
||||
}
|
||||
return __data[__idx];
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY constexpr reference operator()(index_type __idx) const noexcept
|
||||
{
|
||||
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T>() index out of bounds");
|
||||
return __data[__idx];
|
||||
}
|
||||
return __data[__idx];
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data; }
|
||||
|
||||
|
||||
@@ -473,12 +473,12 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::str(const string_type& __s)
|
||||
{
|
||||
while (__sz > INT_MAX)
|
||||
{
|
||||
this->pbump(INT_MAX);
|
||||
__sz -= INT_MAX;
|
||||
this->pbump(INT_MAX);
|
||||
__sz -= INT_MAX;
|
||||
}
|
||||
if (__sz > 0)
|
||||
this->pbump(__sz);
|
||||
}
|
||||
this->pbump(__sz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ void __throw_logic_error(const char*__msg)
|
||||
throw logic_error(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ void __throw_domain_error(const char*__msg)
|
||||
throw domain_error(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ void __throw_invalid_argument(const char*__msg)
|
||||
throw invalid_argument(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ void __throw_length_error(const char*__msg)
|
||||
throw length_error(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ void __throw_out_of_range(const char*__msg)
|
||||
throw out_of_range(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ void __throw_range_error(const char*__msg)
|
||||
throw range_error(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ void __throw_bad_cast()
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw bad_cast();
|
||||
#else
|
||||
_VSTD::abort();
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
Reference in New Issue
Block a user