Add some const_casts in places where we were implicitly casting away constness. No functional change, but now they're explicit
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305410 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__functional_03 b/include/__functional_03
index 1db7082..13d8a3d 100644
--- a/include/__functional_03
+++ b/include/__functional_03
@@ -704,7 +704,7 @@
{
if (__f_ == 0)
return (_Tp*)0;
- return (_Tp*)__f_->target(typeid(_Tp));
+ return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
}
template<class _Rp>
@@ -980,7 +980,7 @@
{
if (__f_ == 0)
return (_Tp*)0;
- return (_Tp*)__f_->target(typeid(_Tp));
+ return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
}
template<class _Rp, class _A0>
@@ -1256,7 +1256,7 @@
{
if (__f_ == 0)
return (_Tp*)0;
- return (_Tp*)__f_->target(typeid(_Tp));
+ return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
}
template<class _Rp, class _A0, class _A1>
@@ -1532,7 +1532,7 @@
{
if (__f_ == 0)
return (_Tp*)0;
- return (_Tp*)__f_->target(typeid(_Tp));
+ return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
}
template<class _Rp, class _A0, class _A1, class _A2>