From c0219c12ccdf2db07c41d16a202fceb1c3726567 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 27 Mar 2005 12:35:06 +0000 Subject: [PATCH] simplify. Patch by Matthias Neeracher. --- flower/include/virtual-methods.hh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/flower/include/virtual-methods.hh b/flower/include/virtual-methods.hh index e4dcd8ade6..76ed3e9ea3 100644 --- a/flower/include/virtual-methods.hh +++ b/flower/include/virtual-methods.hh @@ -25,17 +25,9 @@ demangle_classname (std::type_info const &); }; */ #define VIRTUAL_COPY_CONSTRUCTOR(Base, name) \ - /* Hack to fix constness: gcc >= 2.95 is correct in defining \ - typeof (*this) in a const member function to be const. */ \ - virtual Base *clone_const_helper () \ - { \ - return new name (*this); \ - } \ virtual Base *clone () const \ { \ - /* return new name (*this); */ \ - Base *urg = (Base *) this; \ - return urg->clone_const_helper (); \ + return new name (*this); \ } #endif /* VIRTUAL_METHODS_HH */ -- 2.39.5