]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/script-def.cc
release: 1.1.6
[lilypond.git] / lily / script-def.cc
index fa067cd3cc96b9d08d1f1ea72e248b805a13d98a..b74cf814f00dfbbf8c89d514681350d6368dbd08 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "debug.hh"
@@ -46,8 +46,8 @@ Script_def::do_print() const
 bool
 Script_def::do_equal_b (General_script_def const *g) const 
 {
-  Script_def const * c = (Script_def const*) g;
-  return (symidx_str_ == c->symidx_str_ &&
+  Script_def const * c = dynamic_cast<Script_def const*> (g);
+  return c&& (symidx_str_ == c->symidx_str_ &&
          rel_stem_dir_ == c->rel_stem_dir_&&
          staff_dir_ == c->staff_dir_&&
          invertsym_b_ == c->invertsym_b_);
@@ -75,14 +75,14 @@ Atom
 Script_def::get_atom (Paper_def *p , Direction d) const
 {
   String preidx_str ="";
-  if (invertsym_b_&& d < 0) 
-    preidx_str = "-";
+  if (invertsym_b_)
+    preidx_str = (d < 0)? "d" : "u";
 
-  return p->lookup_l()->script (preidx_str + symidx_str_);
+  return p->lookup_l(0)->script (preidx_str + symidx_str_);
 }
 
 
-IMPLEMENT_IS_TYPE_B1(Script_def,General_script_def);
+
 
 int
 Script_def::priority_i() const