Use nullptr instead of the literal 0

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302100 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2017-05-04 01:06:56 +00:00
parent ca57b1475e
commit 83e040ffab
2 changed files with 3 additions and 3 deletions

View File

@@ -3559,7 +3559,7 @@ template <class _Tp, class _Dp, class _Alloc>
const void* const void*
__shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const type_info& __t) const _NOEXCEPT __shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const type_info& __t) const _NOEXCEPT
{ {
return __t == typeid(_Dp) ? _VSTD::addressof(__data_.first().second()) : 0; return __t == typeid(_Dp) ? _VSTD::addressof(__data_.first().second()) : nullptr;
} }
#endif // _LIBCPP_NO_RTTI #endif // _LIBCPP_NO_RTTI

View File

@@ -120,7 +120,7 @@ __shared_weak_count::lock() _NOEXCEPT
object_owners+1)) object_owners+1))
return this; return this;
} }
return 0; return nullptr;
} }
#if !defined(_LIBCPP_NO_RTTI) || !defined(_LIBCPP_BUILD_STATIC) #if !defined(_LIBCPP_NO_RTTI) || !defined(_LIBCPP_BUILD_STATIC)
@@ -128,7 +128,7 @@ __shared_weak_count::lock() _NOEXCEPT
const void* const void*
__shared_weak_count::__get_deleter(const type_info&) const _NOEXCEPT __shared_weak_count::__get_deleter(const type_info&) const _NOEXCEPT
{ {
return 0; return nullptr;
} }
#endif // _LIBCPP_NO_RTTI #endif // _LIBCPP_NO_RTTI