X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fduration.cc;h=f2d79799dee81707d0e304b4536787b6b38d7ecc;hb=75eebcb49e52d296b1da3e1074e0825d2c780db4;hp=642d7b250ceda79acb2626a7506ffdca698c548e;hpb=eea589c2d7bee6ab38bc611eb205d4c74e2011f7;p=lilypond.git diff --git a/lily/duration.cc b/lily/duration.cc index 642d7b250c..f2d79799de 100644 --- a/lily/duration.cc +++ b/lily/duration.cc @@ -3,9 +3,8 @@ source file of the LilyPond music typesetter - (c) 1997--2004 Jan Nieuwenhuizen - Han-Wen Nienhuys - + (c) 1997--2006 Jan Nieuwenhuizen + Han-Wen Nienhuys */ #include "duration.hh" @@ -48,7 +47,7 @@ Duration::get_length () const { Rational mom (1 << abs (durlog_)); - if (durlog_> 0) + if (durlog_ > 0) mom = Rational (1) / mom; Rational delta = mom; @@ -66,8 +65,8 @@ Duration::to_string () const { String s; - if (durlog_ < 0 ) - s = "log = " + ::to_string (durlog_); + if (durlog_ < 0) + s = "log = " + ::to_string (durlog_); else s = ::to_string (1 << durlog_); @@ -77,7 +76,6 @@ Duration::to_string () const return s; } - IMPLEMENT_TYPE_P (Duration, "ly:duration?"); SCM @@ -90,7 +88,7 @@ IMPLEMENT_SIMPLE_SMOBS (Duration); int Duration::print_smob (SCM s, SCM port, scm_print_state *) { - Duration *r = (Duration *) SCM_CELL_WORD_1 (s); + Duration *r = (Duration *) SCM_CELL_WORD_1 (s); scm_puts ("#to_string ().to_str0 ()), port); @@ -100,10 +98,10 @@ Duration::print_smob (SCM s, SCM port, scm_print_state *) } SCM -Duration::equal_p (SCM a , SCM b) +Duration::equal_p (SCM a, SCM b) { - Duration *p = (Duration *) SCM_CELL_WORD_1 (a); - Duration *q = (Duration *) SCM_CELL_WORD_1 (b); + Duration *p = (Duration *) SCM_CELL_WORD_1 (a); + Duration *q = (Duration *) SCM_CELL_WORD_1 (b); bool eq = p->dots_ == q->dots_ && p->durlog_ == q->durlog_ @@ -112,7 +110,6 @@ Duration::equal_p (SCM a , SCM b) return eq ? SCM_BOOL_T : SCM_BOOL_F; } - int Duration::duration_log () const {