From ec68268b957358789f3f77a065740e7b9a491a7d Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Wed, 17 Feb 2010 14:43:47 +0100 Subject: [PATCH] FiguredBass: Extract resetting a figure object to its own method --- lily/figured-bass-engraver.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lily/figured-bass-engraver.cc b/lily/figured-bass-engraver.cc index d710ca1d3e..d2237e3af2 100644 --- a/lily/figured-bass-engraver.cc +++ b/lily/figured-bass-engraver.cc @@ -51,15 +51,20 @@ struct Figure_group { figure_item_ = 0; continuation_line_ = 0; - number_ = SCM_EOL; - alteration_ = SCM_EOL; - augmented_ = SCM_EOL; - diminished_ = SCM_EOL; - augmented_slash_ = SCM_EOL; - text_ = SCM_EOL; + reset_figure (); group_ = 0; current_event_ = 0; } + /* Reset (or init) all figure information to FALSE */ + void reset_figure () + { + number_ = SCM_BOOL_F; + alteration_ = SCM_BOOL_F; + augmented_ = SCM_BOOL_F; + diminished_ = SCM_BOOL_F; + augmented_slash_ = SCM_BOOL_F; + text_ = SCM_BOOL_F; + } /* Mark the members of the struct as used for the GUILE Garbage Collection */ void gc_mark () const { @@ -378,12 +383,7 @@ Figured_bass_engraver::process_music () { if (!groups_[i].is_continuation ()) { - groups_[i].number_ = SCM_BOOL_F; - groups_[i].alteration_ = SCM_BOOL_F; - groups_[i].augmented_ = SCM_BOOL_F; - groups_[i].diminished_ = SCM_BOOL_F; - groups_[i].augmented_slash_ = SCM_BOOL_F; - groups_[i].text_ = SCM_BOOL_F; + groups_[i].reset_figure (); } } -- 2.39.2