From 98b5d41f6eee82aa7cb9da7dbfafdd35872830bd Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Tue, 24 Jun 2014 12:56:22 +0200 Subject: [PATCH] Don't call Pitch::Pitch with more arguments than necessary. --- lily/chord-name-engraver.cc | 2 +- lily/drum-note-performer.cc | 2 +- lily/key-engraver.cc | 2 +- lily/key-performer.cc | 2 +- lily/note-heads-engraver.cc | 2 +- lily/parser.yy | 6 +++--- lily/pitch-interval.cc | 8 ++++---- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index 0cb0a7d8e4..b4f1dd33be 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -106,7 +106,7 @@ Chord_name_engraver::process_music () SCM oct = n->get_property ("octavation"); if (scm_is_number (oct)) { - Pitch orig = unsmob_pitch (p)->transposed (Pitch (-scm_to_int (oct), 0, 0)); + Pitch orig = unsmob_pitch (p)->transposed (Pitch (-scm_to_int (oct), 0)); pitches = scm_cons (orig.smobbed_copy (), pitches); } else diff --git a/lily/drum-note-performer.cc b/lily/drum-note-performer.cc index e3371a51c0..531c3dde32 100644 --- a/lily/drum-note-performer.cc +++ b/lily/drum-note-performer.cc @@ -81,7 +81,7 @@ Drum_note_performer::process_music () } Audio_note *p = new Audio_note (*pit, len, - tie_event, Pitch (0, 0, 0), velocity); + tie_event, Pitch (0, 0), velocity); Audio_element_info info (p, n); announce_element (info); } diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 5b48b1d78a..07324d230b 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -209,7 +209,7 @@ Key_engraver::initialize () context ()->set_property ("keyAlterations", SCM_EOL); context ()->set_property ("lastKeyAlterations", SCM_EOL); - Pitch p (0, 0, 0); + Pitch p; context ()->set_property ("tonic", p.smobbed_copy ()); } diff --git a/lily/key-performer.cc b/lily/key-performer.cc index 9a3675fe3a..4fcd3f6fa6 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -65,7 +65,7 @@ Key_performer::process_music () scm_to_int (scm_caar (pitchlist)), ly_scm2rational (scm_cdar (pitchlist))); - Pitch c_do (0, 0, 0); + Pitch c_do; SCM c_pitchlist = ly_transpose_key_alist (pitchlist, diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 5caf42f221..2aec7501b5 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -99,7 +99,7 @@ Note_heads_engraver::process_music () if (scm_is_vector (shape_vector)) { SCM scm_tonic = get_property ("tonic"); - Pitch tonic (0, 0, 0); + Pitch tonic; if (unsmob_pitch (scm_tonic)) tonic = *unsmob_pitch (scm_tonic); diff --git a/lily/parser.yy b/lily/parser.yy index 0c7b13da9b..d47fa7ce10 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -2886,7 +2886,7 @@ steno_pitch: if (!scm_is_eq (SCM_INUM0, $2)) { Pitch p = *unsmob_pitch ($1); - p = p.transposed (Pitch (scm_to_int ($2),0,0)); + p = p.transposed (Pitch (scm_to_int ($2), 0)); $$ = p.smobbed_copy (); } } @@ -2901,7 +2901,7 @@ steno_tonic_pitch: if (!scm_is_eq (SCM_INUM0, $2)) { Pitch p = *unsmob_pitch ($1); - p = p.transposed (Pitch (scm_to_int ($2),0,0)); + p = p.transposed (Pitch (scm_to_int ($2), 0)); $$ = p.smobbed_copy (); } } @@ -2913,7 +2913,7 @@ pitch: if (!scm_is_eq (SCM_INUM0, $2)) { Pitch p = *unsmob_pitch ($1); - p = p.transposed (Pitch (scm_to_int ($2),0,0)); + p = p.transposed (Pitch (scm_to_int ($2), 0)); $$ = p.smobbed_copy (); } } diff --git a/lily/pitch-interval.cc b/lily/pitch-interval.cc index 1103904418..db5bae653b 100644 --- a/lily/pitch-interval.cc +++ b/lily/pitch-interval.cc @@ -29,8 +29,8 @@ Pitch_interval::Pitch_interval (Pitch p1, Pitch p2) Pitch_interval::Pitch_interval () { - at (LEFT) = Pitch (100, 0, 0); - at (RIGHT) = Pitch (-100, 0, 0); + at (LEFT) = Pitch (100, 0); + at (RIGHT) = Pitch (-100, 0); } bool @@ -64,8 +64,8 @@ Pitch_lexicographic_interval::Pitch_lexicographic_interval (Pitch p1, Pitch p2) Pitch_lexicographic_interval::Pitch_lexicographic_interval () { - at (LEFT) = Pitch (100, 0, 0); - at (RIGHT) = Pitch (-100, 0, 0); + at (LEFT) = Pitch (100, 0); + at (RIGHT) = Pitch (-100, 0); } bool -- 2.39.5