From 53f9f4484f97138ee0c6fe8a54307eb1fc23c6f4 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 29 Jun 2001 20:34:32 +0000 Subject: [PATCH] Removed consts and associated const_casts from Borland workaround code. [SVN r10486] --- include/boost/function.hpp | 8 +++----- include/boost/function/function_template.hpp | 18 ++++++------------ 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/include/boost/function.hpp b/include/boost/function.hpp index 6c9af12..cb1d344 100644 --- a/include/boost/function.hpp +++ b/include/boost/function.hpp @@ -460,7 +460,7 @@ namespace boost { #ifdef __BORLANDC__ template - function(const Functor* fc) : base_type(fc) {} + function(Functor* f) : base_type(f) {} #endif // __BORLANDC__ function(const function& f) : base_type(static_cast(f)){} @@ -474,9 +474,8 @@ namespace boost { #ifdef __BORLANDC__ template - function& operator=(const Functor* fc) + function& operator=(Functor* f) { - Functor* f = const_cast(fc); this->assign_to(f); return *this; } @@ -502,9 +501,8 @@ namespace boost { #ifdef __BORLANDC__ template - void set(const Functor* fc) + void set(Functor* f) { - Functor* f = const_cast(fc); this->assign_to(f); } #endif // __BORLANDC__ diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index b0cc94a..af3929b 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -842,9 +842,8 @@ namespace boost { #ifdef __BORLANDC__ template - BOOST_FUNCTION_FUNCTION(const Functor* fc) : base_type() + BOOST_FUNCTION_FUNCTION(Functor* f) : base_type() { - Functor* f = const_cast(fc); this->assign_to(f); } #endif // __BORLANDC__ @@ -904,9 +903,8 @@ namespace boost { #ifdef __BORLANDC__ template - BOOST_FUNCTION_FUNCTION& operator=(const Functor* fc) + BOOST_FUNCTION_FUNCTION& operator=(Functor* f) { - Functor* f = const_cast(fc); this->assign_to(f); return *this; } @@ -920,9 +918,8 @@ namespace boost { #ifdef __BORLANDC__ template - void set(const Functor* fc) + void set(Functor* f) { - Functor* f = const_cast(fc); this->assign_to(f); } #endif // __BORLANDC__ @@ -983,9 +980,8 @@ namespace boost { #ifdef __BORLANDC__ template - BOOST_FUNCTION_FUNCTION(const Functor* fc) : base_type() + BOOST_FUNCTION_FUNCTION(Functor* f) : base_type() { - Functor* f = const_cast(fc); this->assign_to(f); } #endif // __BORLANDC__ @@ -1038,9 +1034,8 @@ namespace boost { #ifdef __BORLANDC__ template - BOOST_FUNCTION_FUNCTION& operator=(const Functor* fc) + BOOST_FUNCTION_FUNCTION& operator=(Functor* f) { - Functor* f = const_cast(fc); this->assign_to(f); return *this; } @@ -1054,9 +1049,8 @@ namespace boost { #ifdef __BORLANDC__ template - void set(const Functor* fc) + void set(Functor* f) { - Functor* f = const_cast(fc); this->assign_to(f); } #endif // __BORLANDC__