mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 04:46:08 +00:00
clean up some qualifier casting
This cleans up the `-Wqual-cast` warnings from gcc 6 when building libc++. NFC. llvm-svn: 290789
This commit is contained in:
parent
94865f9ab0
commit
2177f3ce5f
@ -297,7 +297,7 @@ __stdoutbuf<_CharT>::overflow(int_type __c)
|
||||
return traits_type::eof();
|
||||
if (__r == codecvt_base::partial)
|
||||
{
|
||||
pbase = (char_type*)__e;
|
||||
pbase = const_cast<char_type*>(__e);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -443,7 +443,8 @@ inline _LIBCPP_NO_CFI _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp*
|
||||
addressof(_Tp& __x) _NOEXCEPT
|
||||
{
|
||||
return (_Tp*)&reinterpret_cast<const volatile char&>(__x);
|
||||
return reinterpret_cast<_Tp *>(
|
||||
const_cast<char *>(&reinterpret_cast<const volatile char &>(__x)));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF
|
||||
|
Loading…
x
Reference in New Issue
Block a user