Removed consts and associated const_casts from Borland workaround code.

[SVN r10486]
This commit is contained in:
Douglas Gregor
2001-06-29 20:34:32 +00:00
parent db362782ac
commit 53f9f4484f
2 changed files with 9 additions and 17 deletions

View File

@ -460,7 +460,7 @@ namespace boost {
#ifdef __BORLANDC__ #ifdef __BORLANDC__
template<typename Functor> template<typename Functor>
function(const Functor* fc) : base_type(fc) {} function(Functor* f) : base_type(f) {}
#endif // __BORLANDC__ #endif // __BORLANDC__
function(const function& f) : base_type(static_cast<const base_type&>(f)){} function(const function& f) : base_type(static_cast<const base_type&>(f)){}
@ -474,9 +474,8 @@ namespace boost {
#ifdef __BORLANDC__ #ifdef __BORLANDC__
template<typename Functor> template<typename Functor>
function& operator=(const Functor* fc) function& operator=(Functor* f)
{ {
Functor* f = const_cast<Functor*>(fc);
this->assign_to(f); this->assign_to(f);
return *this; return *this;
} }
@ -502,9 +501,8 @@ namespace boost {
#ifdef __BORLANDC__ #ifdef __BORLANDC__
template<typename Functor> template<typename Functor>
void set(const Functor* fc) void set(Functor* f)
{ {
Functor* f = const_cast<Functor*>(fc);
this->assign_to(f); this->assign_to(f);
} }
#endif // __BORLANDC__ #endif // __BORLANDC__

View File

@ -842,9 +842,8 @@ namespace boost {
#ifdef __BORLANDC__ #ifdef __BORLANDC__
template<typename Functor> template<typename Functor>
BOOST_FUNCTION_FUNCTION(const Functor* fc) : base_type() BOOST_FUNCTION_FUNCTION(Functor* f) : base_type()
{ {
Functor* f = const_cast<Functor*>(fc);
this->assign_to(f); this->assign_to(f);
} }
#endif // __BORLANDC__ #endif // __BORLANDC__
@ -904,9 +903,8 @@ namespace boost {
#ifdef __BORLANDC__ #ifdef __BORLANDC__
template<typename Functor> template<typename Functor>
BOOST_FUNCTION_FUNCTION& operator=(const Functor* fc) BOOST_FUNCTION_FUNCTION& operator=(Functor* f)
{ {
Functor* f = const_cast<Functor*>(fc);
this->assign_to(f); this->assign_to(f);
return *this; return *this;
} }
@ -920,9 +918,8 @@ namespace boost {
#ifdef __BORLANDC__ #ifdef __BORLANDC__
template<typename Functor> template<typename Functor>
void set(const Functor* fc) void set(Functor* f)
{ {
Functor* f = const_cast<Functor*>(fc);
this->assign_to(f); this->assign_to(f);
} }
#endif // __BORLANDC__ #endif // __BORLANDC__
@ -983,9 +980,8 @@ namespace boost {
#ifdef __BORLANDC__ #ifdef __BORLANDC__
template<typename Functor> template<typename Functor>
BOOST_FUNCTION_FUNCTION(const Functor* fc) : base_type() BOOST_FUNCTION_FUNCTION(Functor* f) : base_type()
{ {
Functor* f = const_cast<Functor*>(fc);
this->assign_to(f); this->assign_to(f);
} }
#endif // __BORLANDC__ #endif // __BORLANDC__
@ -1038,9 +1034,8 @@ namespace boost {
#ifdef __BORLANDC__ #ifdef __BORLANDC__
template<typename Functor> template<typename Functor>
BOOST_FUNCTION_FUNCTION& operator=(const Functor* fc) BOOST_FUNCTION_FUNCTION& operator=(Functor* f)
{ {
Functor* f = const_cast<Functor*>(fc);
this->assign_to(f); this->assign_to(f);
return *this; return *this;
} }
@ -1054,9 +1049,8 @@ namespace boost {
#ifdef __BORLANDC__ #ifdef __BORLANDC__
template<typename Functor> template<typename Functor>
void set(const Functor* fc) void set(Functor* f)
{ {
Functor* f = const_cast<Functor*>(fc);
this->assign_to(f); this->assign_to(f);
} }
#endif // __BORLANDC__ #endif // __BORLANDC__