de-tabbify
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@142237 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
08e17472e4
commit
8db4acad3b
@ -137,40 +137,40 @@ template <class _Tp>
|
||||
void
|
||||
__thread_specific_ptr<_Tp>::__at_thread_exit(void* __p)
|
||||
{
|
||||
delete static_cast<pointer>(__p);
|
||||
delete static_cast<pointer>(__p);
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
__thread_specific_ptr<_Tp>::__thread_specific_ptr()
|
||||
{
|
||||
int __ec = pthread_key_create(&__key_, &__thread_specific_ptr::__at_thread_exit);
|
||||
if (__ec)
|
||||
throw system_error(error_code(__ec, system_category()),
|
||||
"__thread_specific_ptr construction failed");
|
||||
if (__ec)
|
||||
throw system_error(error_code(__ec, system_category()),
|
||||
"__thread_specific_ptr construction failed");
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
__thread_specific_ptr<_Tp>::~__thread_specific_ptr()
|
||||
{
|
||||
pthread_key_delete(__key_);
|
||||
pthread_key_delete(__key_);
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
typename __thread_specific_ptr<_Tp>::pointer
|
||||
__thread_specific_ptr<_Tp>::release()
|
||||
{
|
||||
pointer __p = get();
|
||||
pthread_setspecific(__key_, 0);
|
||||
return __p;
|
||||
pointer __p = get();
|
||||
pthread_setspecific(__key_, 0);
|
||||
return __p;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
void
|
||||
__thread_specific_ptr<_Tp>::reset(pointer __p)
|
||||
{
|
||||
pointer __p_old = get();
|
||||
pthread_setspecific(__key_, __p);
|
||||
delete __p_old;
|
||||
pointer __p_old = get();
|
||||
pthread_setspecific(__key_, __p);
|
||||
delete __p_old;
|
||||
}
|
||||
|
||||
class thread;
|
||||
|
@ -1277,9 +1277,9 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp&&
|
||||
forward(typename std::remove_reference<_Tp>::type&& __t) _NOEXCEPT
|
||||
{
|
||||
static_assert(!std::is_lvalue_reference<_Tp>::value,
|
||||
"Can not forward an rvalue as an lvalue.");
|
||||
return static_cast<_Tp&&>(__t);
|
||||
static_assert(!std::is_lvalue_reference<_Tp>::value,
|
||||
"Can not forward an rvalue as an lvalue.");
|
||||
return static_cast<_Tp&&>(__t);
|
||||
}
|
||||
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
@ -1032,7 +1032,7 @@ ctype_byname<wchar_t>::do_is(mask m, char_type c) const
|
||||
#ifdef _LIBCPP_WCTYPE_IS_MASK
|
||||
return static_cast<bool>(iswctype_l(c, m, __l));
|
||||
#else
|
||||
bool result = true;
|
||||
bool result = true;
|
||||
if (m & space && !iswspace_l(c, __l)) result = false;
|
||||
if (m & print && !iswprint_l(c, __l)) result = false;
|
||||
if (m & cntrl && !iswcntrl_l(c, __l)) result = false;
|
||||
|
@ -22,10 +22,10 @@ locale_t uselocale( locale_t newloc )
|
||||
locale_t old_locale = _get_current_locale();
|
||||
// uselocale sets the thread's locale by definition, so unconditionally use thread-local locale
|
||||
_configthreadlocale( _ENABLE_PER_THREAD_LOCALE );
|
||||
// uselocale sets all categories
|
||||
setlocale( LC_ALL, newloc->locinfo->lc_category[LC_ALL].locale );
|
||||
// uselocale returns the old locale_t
|
||||
return old_locale;
|
||||
// uselocale sets all categories
|
||||
setlocale( LC_ALL, newloc->locinfo->lc_category[LC_ALL].locale );
|
||||
// uselocale returns the old locale_t
|
||||
return old_locale;
|
||||
}
|
||||
lconv *localeconv_l( locale_t loc )
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ int asprintf(char **sptr, const char *__restrict__ fmt, ...)
|
||||
va_start(ap, fmt);
|
||||
int result = vasprintf(sptr, fmt, ap);
|
||||
va_end(ap);
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
int vasprintf( char **sptr, const char *__restrict__ fmt, va_list ap )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user