Re: [PATCH] removed unused macro "classname" , unused funcion "demangle_classname", unneccessary file "flower/rtti.cc"

2011-01-27 Thread Graham Percival
On 1/26/11, Bernard Hurley  wrote:
> The definition of the function "demangle_classname" is the only content
> of flower/rtti.cc. This is only referenced in
> flower/include/virtual-methods.hh, where it is used in the definition of
> the macro "classname".
>
> Hence the references to "demangle_classname" in virtual-methods.hh can
> be deleted along with the file rtti.c
>
> Of course it is possible that someone may have added them recently with
> a view to using them for something, but it looks like historical cruft
> to me.

A quick check with both gitk flower/  and the online git browser shows
that they are, indeed, "historical cruft".  Your patch shows nothing
weird with a regtest comparison.

I'm building all the docs from scratch right now, and I'll push it
once the build finishes and if stuff looks fine.  Thanks!

Cheers,
- Graham

___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


[PATCH] removed unused macro "classname" , unused funcion "demangle_classname", unneccessary file "flower/rtti.cc"

2011-01-26 Thread Bernard Hurley
The definition of the function "demangle_classname" is the only content
of flower/rtti.cc. This is only referenced in
flower/include/virtual-methods.hh, where it is used in the definition of
the macro "classname".

Hence the references to "demangle_classname" in virtual-methods.hh can
be deleted along with the file rtti.c

Of course it is possible that someone may have added them recently with
a view to using them for something, but it looks like historical cruft
to me.

I append a pathch
From 401a52fa2e01da22b8d220e26d5fcb6217fb3556 Mon Sep 17 00:00:00 2001
From: Bernard Hurley 
Date: Wed, 26 Jan 2011 02:23:44 +
Subject: [PATCH] removed unused macro, function and file

The macro "classname" defined in flower/include/virtual-methods.hh is
never used. If it is removed then the function demangle_classname will
never be referenced, and hence file flower/rtti.cc can be removed.
I am assuming that they have not been added by someone who intends to use
them in future.
---
 flower/include/virtual-methods.hh |4 
 flower/rtti.cc|   13 -
 2 files changed, 0 insertions(+), 17 deletions(-)
 delete mode 100644 flower/rtti.cc

diff --git a/flower/include/virtual-methods.hh b/flower/include/virtual-methods.hh
index a38bf15..1d6b023 100644
--- a/flower/include/virtual-methods.hh
+++ b/flower/include/virtual-methods.hh
@@ -23,10 +23,6 @@
 #include 
 using namespace std;
 
-#define classname(class_ptr) demangle_classname (typeid (* (class_ptr)))
-
-char const *
-demangle_classname (type_info const &);
 
 /*
 
diff --git a/flower/rtti.cc b/flower/rtti.cc
deleted file mode 100644
index 39941f8..000
--- a/flower/rtti.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-#include 
-using namespace std;
-
-#include "virtual-methods.hh"
-
-char const *
-demangle_classname (type_info const &t)
-{
-  char const *s = t.name ();
-  while (isdigit (*s))
-s++;
-  return s;
-}
-- 
1.7.1

___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel