From: fred Date: Sun, 24 Mar 2002 19:35:37 +0000 (+0000) Subject: lilypond-0.0.43 X-Git-Tag: release/1.5.59~5171 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4af470408b91035ad871af21384e60a0583aeb53;p=lilypond.git lilypond-0.0.43 --- diff --git a/Documentation/CodingStyle.pod b/Documentation/CodingStyle.pod index 8df4c8fd42..66ee04705f 100644 --- a/Documentation/CodingStyle.pod +++ b/Documentation/CodingStyle.pod @@ -9,26 +9,29 @@ Please use these standards while doing programming for LilyPond Functions and methods do not return errorcodes, but use assert for checking status. - A program should be light and agile, its subroutines - connected like a strings of pearls. The spirit and intent of - the program should be retained throughout. There should be - neither too little nor too much, neither needless loops nor - useless variables, neither lack of structure nor overwhelming - rigidity. - - A program should follow the 'Law of Least - Astonishment'. What is this law? It is simply that the - program should always respond to the user in the way that - astonishes him least. - - A program, no matter how complex, should act as a - single unit. The program should be directed by the logic - within rather than by outward appearances. - - If the program fails in these requirements, it will be - in a state of disorder and confusion. The only way to correct - this is to rewrite the program. - -- Geoffrey James, "The Tao of Programming" +=head2 Quote: + +A program should be light and agile, its subroutines +connected like a strings of pearls. The spirit and intent of +the program should be retained throughout. There should be +neither too little nor too much, neither needless loops nor +useless variables, neither lack of structure nor overwhelming +rigidity. + +A program should follow the 'Law of Least +Astonishment'. What is this law? It is simply that the +program should always respond to the user in the way that +astonishes him least. + +A program, no matter how complex, should act as a +single unit. The program should be directed by the logic +within rather than by outward appearances. + +If the program fails in these requirements, it will be +in a state of disorder and confusion. The only way to correct +this is to rewrite the program. + +-- Geoffrey James, "The Tao of Programming" =head2 INDENTATION @@ -109,7 +112,7 @@ symbols. Staff is the "brains" for PStaff NB: in PCursor (which is part of the library) P stands for PointerCursor -=head2 MEMBERS(2) +=head2 MEMBERS (2) Standard methods: @@ -176,26 +179,33 @@ existed. I feel so stupid and ashamed! =over 5 =item * + more keystrokes (disk space!) =item * + it looks silly C =item * + it looks like code from micro suckers =item * + (which) might scare away some (otherwise good?) progammers, or make you a paria in the free software community =item * + it has ambiguities =item * + not very useful if not used consistently =item * + usefullness in I (but how many classes is very large?) remains an issue. @@ -209,16 +219,20 @@ remains an issue. =over 5 =item * + learn about cut and paste / use emacs or vi or lean to type using ten fingers =item * + Use emacs dabbrev-expand, with dabbrev-case-fold-search set to nil. =item * + use no, or pick less silly, abbrvs. =item * + use non-ambiguous postfixes C =back @@ -230,30 +244,41 @@ with the parts of the names separated by underscores. =over 5 =item C + + unsigned char. (The postfix _by is ambiguous) =item C + + bool =item C + bit =item C + char =item C + float =item C + signed integer =item C + string class =item C + Zero terminated c string =item C + unsigned integer =back @@ -275,21 +300,27 @@ These are precede the prefixes: =over 5 =item C + array =item C + user built array. =item C -const + +const. Note that the proper order C i.s.o. C =item C + temporary pointer to object (link) =item C

+ pointer to newed object =item C + reference =back @@ -297,24 +328,31 @@ reference =over 5 =item C + Variable loop: an integer =item C + Temporary variable: an unsigned integer =item C + Variable test: a character =item C + Variable first_name: a String class object =item C + Variable last_name: a C array =item C + Variable foo: an C that you must delete =item C + Variable bar: an C that you must not delete =back diff --git a/Documentation/Makefile b/Documentation/Makefile index 9f74fbb9a9..272ea0d279 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -8,22 +8,18 @@ depth = .. # identify module: # NAME = Documentation -MAJOR_VERSION = $(TOPLEVEL_MAJOR_VERSION) -MINOR_VERSION = $(TOPLEVEL_MINOR_VERSION) -PATCH_LEVEL = $(TOPLEVEL_PATCH_LEVEL) -# use to send patches, always empty for released version: -MY_PATCH_LEVEL = $(TOPLEVEL_MY_PATCH_LEVEL) -build = ./$(depth)/lily/$(outdir)/.build + # # generic variables: # include ./$(depth)/make/Variables.make +include ./$(depth)/make/Version.make +include ./$(depth)/make/Files.make # -# list of source files: # -PODFILES = $(shell ls *.pod) + OUTPODFILES = $(patsubst %,$(outdir)/%,$(PODFILES)) TEXTFILES = $(OUTPODFILES:.pod=.text) GROFFFILES = $(OUTPODFILES:.pod=.1) @@ -32,7 +28,7 @@ HTMLFILES = $(OUTPODFILES:.pod=.html) # list of distribution files: # -DISTFILES = $(PODFILES) Makefile lelie_logo.gif +EXTRA_DISTFILES = lelie_icon.gif lelie_logo.gif # default: do-doc diff --git a/lily/beam.cc b/lily/beam.cc index 87e9114caf..9a07bcc614 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -24,10 +24,10 @@ struct Stem_info { Stem_info(){} - Stem_info(const Stem*); + Stem_info(Stem const *); }; -Stem_info::Stem_info(const Stem*s) +Stem_info::Stem_info(Stem const *s) { x = s->hindex(); int dir = s->dir; diff --git a/lily/clef-reg.cc b/lily/clef-reg.cc index 791b724083..b4775721bb 100644 --- a/lily/clef-reg.cc +++ b/lily/clef-reg.cc @@ -65,7 +65,7 @@ Clef_register::try_request(Request * r_l) void Clef_register::process_requests() { - const Time_description *time_l = get_staff_info().time_c_l_; + Time_description const *time_l = get_staff_info().time_c_l_; if (!clef_req_l_ && (!time_l->whole_in_measure_|| !time_l->when_)) { clef_p_ = new Clef_item; clef_p_->change = false; diff --git a/lily/dimen.cc b/lily/dimen.cc index 9489ae9a1e..9e5fc2cea0 100644 --- a/lily/dimen.cc +++ b/lily/dimen.cc @@ -7,7 +7,7 @@ Real parse_dimen(String dim) { int i=dim.length_i()-1; - const char *s = dim; + char const *s = dim; while (i > 0 && (isspace(s[i]) || isalpha(s[i])) ){ i--; } diff --git a/lily/idealspacing.cc b/lily/idealspacing.cc index 805cb3bebb..8437aabe22 100644 --- a/lily/idealspacing.cc +++ b/lily/idealspacing.cc @@ -14,7 +14,7 @@ Idealspacing::print() const #endif } -Idealspacing::Idealspacing(const PCol * l,const PCol * r) +Idealspacing::Idealspacing(PCol const * l,PCol const * r) { space = 0.0; hooke = 0.0; diff --git a/lily/include/class-name.hh b/lily/include/class-name.hh index 26da52dc0e..643959d620 100644 --- a/lily/include/class-name.hh +++ b/lily/include/class-name.hh @@ -12,8 +12,8 @@ /// a macro to declare the classes name as a static and virtual function. #define NAME_MEMBERS(c) \ -static const char *static_name(){ return #c; }\ -virtual const char *name() const{ return c::static_name(); } \ +static char const *static_name(){ return #c; }\ +virtual char const *name() const{ return c::static_name(); } \ int a_stupid_nonexistent_function_to_allow_the_semicolon_come_out() #endif // CLASS-NAME_HH diff --git a/lily/include/idealspacing.hh b/lily/include/idealspacing.hh index 05f58ba9c8..6b6f40c01a 100644 --- a/lily/include/idealspacing.hh +++ b/lily/include/idealspacing.hh @@ -18,11 +18,11 @@ struct Idealspacing { Real hooke; /// the two columns - const PCol *left, *right; + PCol const *left, *right; void print()const; void OK() const ; - Idealspacing(const PCol *left,const PCol *right); + Idealspacing(PCol const *left,PCol const *right); }; diff --git a/lily/include/input-score.hh b/lily/include/input-score.hh index 4286f4b60b..a7468e03fa 100644 --- a/lily/include/input-score.hh +++ b/lily/include/input-score.hh @@ -19,7 +19,7 @@ /// the total music def of one movement struct Input_score { /// defined where? - const char* defined_ch_c_l_; + char const * defined_ch_c_l_; int errorlevel_i_; /// paper_, staffs_ and commands_ form the problem definition. @@ -27,7 +27,6 @@ struct Input_score { Midi_def* midi_p_; IPointerList staffs_; - Input_music * score_wide_music_p_; /* *************************************************************** */ Input_score(); @@ -40,7 +39,6 @@ struct Input_score { void set(Midi_def* midi_p); void print() const; Score*parse(); - void set(Input_music*); }; #endif diff --git a/lily/include/input-staff.hh b/lily/include/input-staff.hh index 3b874a1b39..23495bd744 100644 --- a/lily/include/input-staff.hh +++ b/lily/include/input-staff.hh @@ -14,19 +14,17 @@ struct Input_staff { - const char * defined_ch_c_l_; + char const * defined_ch_c_l_; String type; IPointerList music_; - Input_music * score_wide_music_p_; /* *************** */ ~Input_staff(); void add(Input_music*m); Input_staff(Input_staff const&); Input_staff(String); - void set_score_wide(Input_music*m); - Staff* parse(Score*, Input_music *score_wide); + Staff* parse(Score*); void print() const; }; diff --git a/lily/include/keyword.hh b/lily/include/keyword.hh index 152d9dc15d..88ab9ffbe0 100644 --- a/lily/include/keyword.hh +++ b/lily/include/keyword.hh @@ -10,7 +10,7 @@ /* for the keyword table */ struct Keyword_ent { - const char *name; + char const *name; int tokcode; }; @@ -19,7 +19,7 @@ struct Keyword_table Keyword_ent *table; int maxkey; Keyword_table(Keyword_ent *); - int lookup(const char *s) const; + int lookup(char const *s) const; }; diff --git a/lily/include/linespace.hh b/lily/include/linespace.hh index 1479d1e936..2a9e655479 100644 --- a/lily/include/linespace.hh +++ b/lily/include/linespace.hh @@ -9,8 +9,8 @@ /// helper struct for #Spacing_problem# struct Colinfo { - const PCol *pcol_; - const Real* fixpos; + PCol const *pcol_; + Real const * fixpos; Interval width; /* *************** */ @@ -18,7 +18,7 @@ struct Colinfo { void operator=(Colinfo const&); Colinfo(Colinfo const&); ~Colinfo(); - Colinfo(const PCol*,const Real*); + Colinfo(PCol const *,Real const *); void print() const; bool fixed() const { return fixpos;} Real fixed_position()const { return *fixpos; } @@ -47,11 +47,11 @@ struct Colinfo { springs. The lower the energy, the better the configuration. */ class Spacing_problem { - Array ideals; + Array ideals; Array cols; /// the index of #c# in #cols# - int col_id(const PCol *c) const; + int col_id(PCol const *c) const; /// generate an (nonoptimal) solution Vector find_initial_solution() const; @@ -60,7 +60,7 @@ class Spacing_problem { bool check_feasible() const; /// does #this# contain the column #w#? - bool contains(const PCol *w); + bool contains(PCol const *w); /// make the energy function void make_matrices(Matrix &quad, Vector &lin,Real&) const; @@ -84,13 +84,13 @@ public: since they can be "summed" if the columns to which #i# refers are not in this problem, the spacing is ignored. */ - void add_ideal(const Idealspacing *i); + void add_ideal(Idealspacing const *i); /** add a col to the problem. columns have to be added left to right. The column contains info on it's minimum width. */ - void add_column(const PCol *, bool fixed=false, Real fixpos=0.0); + void add_column(PCol const *, bool fixed=false, Real fixpos=0.0); @@ -99,7 +99,7 @@ public: Vector try_initial_solution() const; void OK() const; void print() const; - void print_ideal(const Idealspacing*)const; + void print_ideal(Idealspacing const *)const; }; diff --git a/lily/include/local-key-reg.hh b/lily/include/local-key-reg.hh index d0a2867a87..9611449383 100644 --- a/lily/include/local-key-reg.hh +++ b/lily/include/local-key-reg.hh @@ -13,7 +13,7 @@ struct Local_key_register : Request_register { Local_key local_key_; Local_key_item* key_item_p_; - const Key *key_c_l_; + Key const *key_c_l_; /* *************** */ virtual void process_requests(); virtual void acknowledge_element(Staff_elem_info); diff --git a/lily/include/p-col.hh b/lily/include/p-col.hh index 2641e64008..48d6c62a19 100644 --- a/lily/include/p-col.hh +++ b/lily/include/p-col.hh @@ -21,8 +21,8 @@ */ struct PCol { - PointerList its; - PointerList stoppers, starters; + PointerList its; + PointerList stoppers, starters; @@ -40,7 +40,7 @@ struct PCol { PCol *daddy_l_; /// if lines are broken then this column is in #line# - const Line_of_score *line_l_; + Line_of_score const *line_l_; /// if lines are broken then this column x-coord #hpos# Real hpos; diff --git a/lily/include/p-score.hh b/lily/include/p-score.hh index eeec67e2fb..3177613ec5 100644 --- a/lily/include/p-score.hh +++ b/lily/include/p-score.hh @@ -67,7 +67,7 @@ struct PScore { /** @return argument as a cursor of the list */ - PCursor find_col(const PCol *)const; + PCursor find_col(PCol const *)const; /* MAIN ROUTINES */ void process(); diff --git a/lily/include/p-staff.hh b/lily/include/p-staff.hh index 50a7f0c719..c95834c2fb 100644 --- a/lily/include/p-staff.hh +++ b/lily/include/p-staff.hh @@ -11,7 +11,7 @@ struct PStaff { PScore * pscore_l_; - PointerList spans; + PointerList spans; PointerList its; /* *************** */ diff --git a/lily/include/paper-def.hh b/lily/include/paper-def.hh index fba93580cb..5086a0ff0c 100644 --- a/lily/include/paper-def.hh +++ b/lily/include/paper-def.hh @@ -47,7 +47,7 @@ public: Real standard_height()const; Real note_width() const; void print() const; - const Lookup* lookup_l(); // TODO naming + Lookup const * lookup_l(); // TODO naming Real duration_to_dist(Moment); }; diff --git a/lily/include/qlpsolve.hh b/lily/include/qlpsolve.hh index 7c9b8da341..3423951452 100644 --- a/lily/include/qlpsolve.hh +++ b/lily/include/qlpsolve.hh @@ -32,7 +32,7 @@ class Active_constraints { Matrix A,H; Array active; Array inactive; // actually this is a set, not an array. - const Ineq_constrained_qp *opt; + Ineq_constrained_qp const *opt; public: String status()const; diff --git a/lily/include/score.hh b/lily/include/score.hh index a865ed02f3..4f10a7f95f 100644 --- a/lily/include/score.hh +++ b/lily/include/score.hh @@ -28,7 +28,7 @@ struct Score { IPointerList cols_; PScore *pscore_p_; - const char *defined_ch_c_l_; + char const *defined_ch_c_l_; int errorlevel_i_; /* *************************************************************** */ diff --git a/lily/include/scoreline.hh b/lily/include/scoreline.hh index f4e1987033..9196a96ab3 100644 --- a/lily/include/scoreline.hh +++ b/lily/include/scoreline.hh @@ -26,7 +26,7 @@ Line_of_score { String TeXstring() const; // is #c# contained in #*this#? - bool element(const PCol *c); + bool element(PCol const *c); }; #endif diff --git a/lily/include/staff-elem-info.hh b/lily/include/staff-elem-info.hh index c07f242e31..4e3392027d 100644 --- a/lily/include/staff-elem-info.hh +++ b/lily/include/staff-elem-info.hh @@ -17,7 +17,7 @@ struct Staff_elem_info { Staff_elem * elem_p_; Request*req_l_; - const Voice * voice_l_; + Voice const * voice_l_; Array origin_reg_l_arr_; /* *** */ @@ -28,8 +28,8 @@ struct Staff_elem_info { struct Staff_info { int *c0_position_i_; Staff_walker *walk_l_; - const Time_description *time_c_l_; - const Rhythmic_grouping *rhythmic_c_l_; + Time_description const *time_c_l_; + Rhythmic_grouping const *rhythmic_c_l_; bool break_allowed_b_; }; diff --git a/lily/include/staffeleminfo.hh b/lily/include/staffeleminfo.hh index b8af8aeb22..14652899d4 100644 --- a/lily/include/staffeleminfo.hh +++ b/lily/include/staffeleminfo.hh @@ -16,7 +16,7 @@ struct Staff_elem_info { Staff_elem * elem_p_; Request*req_l_; - const Voice * voice_l_; + Voice const * voice_l_; Voice_group_registers * group_regs_l_; Request_register * origin_reg_l_; diff --git a/lily/input-score.cc b/lily/input-score.cc index f39d47a4b1..d68dd10959 100644 --- a/lily/input-score.cc +++ b/lily/input-score.cc @@ -42,8 +42,6 @@ Input_score::Input_score(Input_score const&s) midi_p_ = (s.midi_p_)? new Midi_def(*s.midi_p_) : 0; defined_ch_c_l_ = s.defined_ch_c_l_; errorlevel_i_ = s.errorlevel_i_; - score_wide_music_p_ = (s.score_wide_music_p_) ? - s.score_wide_music_p_->clone():0; } Score* @@ -55,34 +53,25 @@ Input_score::parse() if (midi_p_) s_p->set(new Midi_def(*midi_p_)); if (paper_p_) - s_p->set( new Paper_def(*paper_p_)); + s_p->set(new Paper_def(*paper_p_)); for (iter_top(staffs_,i); i.ok(); i++) { - Staff* staf_p=i->parse(s_p, score_wide_music_p_); + Staff* staf_p=i->parse(s_p); s_p->add(staf_p); } return s_p; } -void -Input_score::set(Input_music *m_p) -{ - delete score_wide_music_p_; - score_wide_music_p_ =m_p; -} - Input_score::~Input_score() { delete paper_p_; - delete score_wide_music_p_; delete midi_p_; } Input_score::Input_score() { - score_wide_music_p_ =0; defined_ch_c_l_=0; paper_p_= 0; midi_p_ = 0; diff --git a/lily/key-item.cc b/lily/key-item.cc index 089eab126f..726af8cb30 100644 --- a/lily/key-item.cc +++ b/lily/key-item.cc @@ -18,7 +18,7 @@ Key_item::Key_item(int c) } void -Key_item::read(const Key_register& key_reg_r) +Key_item::read(Key_register const & key_reg_r) { const Array &idx_arr =key_reg_r.accidental_idx_arr_; for (int i = 0 ; i< idx_arr.size(); i++) { diff --git a/lily/key-reg.cc b/lily/key-reg.cc index 24189a532b..865eea264e 100644 --- a/lily/key-reg.cc +++ b/lily/key-reg.cc @@ -49,7 +49,7 @@ Key_register::acknowledge_element(Staff_elem_info info) void Key_register::process_requests() { - const Time_description *time_l = get_staff_info().time_c_l_; + Time_description const *time_l = get_staff_info().time_c_l_; if (!keyreq_l_ && (!time_l->whole_in_measure_|| !time_l->when_)) { diff --git a/lily/lily-version.cc b/lily/lily-version.cc index fff9ec7f8a..389178bbc3 100644 --- a/lily/lily-version.cc +++ b/lily/lily-version.cc @@ -7,7 +7,7 @@ static const int build= #include ".build" ; -const char * +char const * lily_version_sz() { static char v[1024]; diff --git a/lily/linespace.cc b/lily/linespace.cc index 750487cff7..3d8637b6dc 100644 --- a/lily/linespace.cc +++ b/lily/linespace.cc @@ -10,7 +10,7 @@ const Real COLFUDGE=1e-3; bool -Spacing_problem::contains(const PCol *w) +Spacing_problem::contains(PCol const *w) { for (int i=0; i< cols.size(); i++) if (cols[i].pcol_ == w) @@ -19,7 +19,7 @@ Spacing_problem::contains(const PCol *w) } int -Spacing_problem::col_id(const PCol *w)const +Spacing_problem::col_id(PCol const *w)const { for (int i=0; i< cols.size(); i++) if (cols[i].pcol_ == w) @@ -194,17 +194,17 @@ Spacing_problem::solve() const add one column to the problem. */ void -Spacing_problem::add_column(const PCol *col, bool fixed, Real fixpos) +Spacing_problem::add_column(PCol const *col, bool fixed, Real fixpos) { Colinfo c(col,(fixed)? &fixpos : 0); cols.push(c); } void -Spacing_problem::add_ideal(const Idealspacing *i) +Spacing_problem::add_ideal(Idealspacing const *i) { - const PCol *l =i->left; - const PCol *r= i->right; + PCol const *l =i->left; + PCol const *r= i->right; if (!contains(l) || !contains(r)) { return; @@ -213,7 +213,7 @@ Spacing_problem::add_ideal(const Idealspacing *i) } void -Spacing_problem::print_ideal(const Idealspacing*id)const +Spacing_problem::print_ideal(Idealspacing const *id)const { #ifndef NPRINT int l = col_id(id->left); @@ -261,7 +261,7 @@ Colinfo::Colinfo(Colinfo const&c) width = c.width; } -Colinfo::Colinfo(const PCol*col_p, const Real*fixed_r_p ) +Colinfo::Colinfo(PCol const *col_p, Real const *fixed_r_p ) { fixpos = (fixed_r_p)? new Real(*fixed_r_p) : 0; pcol_ = col_p; diff --git a/lily/local-key-reg.cc b/lily/local-key-reg.cc index ddbd8dc5f8..bf7eb9c352 100644 --- a/lily/local-key-reg.cc +++ b/lily/local-key-reg.cc @@ -30,12 +30,12 @@ Local_key_register::pre_move_processing() void Local_key_register::acknowledge_element(Staff_elem_info info) { - if (info.req_l_->melodic()) { - Melodic_req * melodic_l_ = info.req_l_->melodic(); + if (info.req_l_->note()) { + Note_req * note_l_ = info.req_l_->note(); - if( melodic_l_->forceacc_b_ || - local_key_.oct(melodic_l_->octave_i_).acc(melodic_l_->notename_i_) - != melodic_l_->accidental_i_) { + if( note_l_->forceacc_b_ || + local_key_.oct(note_l_->octave_i_).acc(note_l_->notename_i_) + != note_l_->accidental_i_) { Item * support_l_ = info.elem_p_->item(); @@ -43,10 +43,10 @@ Local_key_register::acknowledge_element(Staff_elem_info info) key_item_p_ = new Local_key_item(*get_staff_info().c0_position_i_); } - key_item_p_->add(melodic_l_); + key_item_p_->add(note_l_); key_item_p_->add(support_l_); - local_key_.oct(melodic_l_->octave_i_) - .set(melodic_l_->notename_i_, melodic_l_->accidental_i_); + local_key_.oct(note_l_->octave_i_) + .set(note_l_->notename_i_, note_l_->accidental_i_); } } else if (info.elem_p_->name()==Key_item::static_name()) { Key_register * key_reg_l = @@ -59,7 +59,7 @@ Local_key_register::acknowledge_element(Staff_elem_info info) void Local_key_register::process_requests() { - const Time_description * time_c_l_ = get_staff_info().time_c_l_; + Time_description const * time_c_l_ = get_staff_info().time_c_l_; if (! time_c_l_->whole_in_measure_){ if (key_c_l_) local_key_.reset(*key_c_l_); diff --git a/lily/molecule.cc b/lily/molecule.cc index bfd298bfac..94d94cfd13 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -71,7 +71,7 @@ Molecule::translate(Offset o) } void -Molecule::add(const Molecule &m) +Molecule::add(Molecule const &m) { for (iter_top(m.ats,c); c.ok(); c++) { add(**c); @@ -79,7 +79,7 @@ Molecule::add(const Molecule &m) } void -Molecule::add_right(const Molecule &m) +Molecule::add_right(Molecule const &m) { if (!ats.size()) { add(m); @@ -92,7 +92,7 @@ Molecule::add_right(const Molecule &m) } void -Molecule::add_left(const Molecule &m) +Molecule::add_left(Molecule const &m) { if (!ats.size()) { add(m); @@ -106,7 +106,7 @@ Molecule::add_left(const Molecule &m) void -Molecule::add_top(const Molecule &m) +Molecule::add_top(Molecule const &m) { if (!ats.size()) { add(m); @@ -119,7 +119,7 @@ Molecule::add_top(const Molecule &m) } void -Molecule::add_bottom(const Molecule &m) +Molecule::add_bottom(Molecule const &m) { if (!ats.size()) { add(m); @@ -132,12 +132,12 @@ Molecule::add_bottom(const Molecule &m) } void -Molecule::operator = (const Molecule&) +Molecule::operator = (Molecule const &) { assert(false); } -Molecule::Molecule(const Molecule&s) +Molecule::Molecule(Molecule const &s) { add(s); } diff --git a/lily/p-col.cc b/lily/p-col.cc index 2bfa097431..caaf264766 100644 --- a/lily/p-col.cc +++ b/lily/p-col.cc @@ -52,7 +52,7 @@ PCol::print() const } int -PCol::compare(const PCol &c1, const PCol &c2) +PCol::compare(PCol const &c1, PCol const &c2) { PScore*ps_l = c1.pscore_l_; PCursor ac(ps_l->find_col(&c1)); diff --git a/lily/p-score.cc b/lily/p-score.cc index 582a3148ef..9e31523da1 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -137,7 +137,7 @@ PScore::select_items(PStaff*ps, PCol*pc) assert(ps && pc); for (iter_top(pc->its,i); i.ok(); i++){ if (i->pstaff_l_ == ps) - ret.push((Item*)(const Item*)i); + ret.push((Item*)(Item const *)i); } return ret; } @@ -204,9 +204,9 @@ PScore::postprocess() } PCursor -PScore::find_col(const PCol *c)const +PScore::find_col(PCol const *c)const { - const PCol*what = c; + PCol const *what = c; if (what->daddy_l_ ) what = what->daddy_l_; diff --git a/lily/paper-def.cc b/lily/paper-def.cc index 6063347e88..1b3a74b2a5 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -89,7 +89,7 @@ Paper_def::print() const mtor << "}\n"; #endif } -const Lookup* +Lookup const * Paper_def::lookup_l() { return lookup_p_; diff --git a/lily/stem-beam-reg.cc b/lily/stem-beam-reg.cc index 67c7b5b54d..de09bb0940 100644 --- a/lily/stem-beam-reg.cc +++ b/lily/stem-beam-reg.cc @@ -124,7 +124,7 @@ Stem_beam_register::pre_move_processing() stem_p_ = 0; } if (beam_p_ && end_beam_b_) { - const Rhythmic_grouping * rg_c_l = get_staff_info().rhythmic_c_l_; + Rhythmic_grouping const * rg_c_l = get_staff_info().rhythmic_c_l_; rg_c_l->extend(current_grouping->interval()); beam_p_->set_grouping(*rg_c_l, *current_grouping); typeset_element(beam_p_); diff --git a/lily/tex-stream.cc b/lily/tex-stream.cc index 2125593ab6..4157f08563 100644 --- a/lily/tex-stream.cc +++ b/lily/tex-stream.cc @@ -43,7 +43,7 @@ Tex_stream & Tex_stream::operator<<(String s) { - for (const char *cp = s; *cp; cp++) { + for (char const *cp = s; *cp; cp++) { if (outputting_comment) { *os << *cp; if (*cp == '\n') { diff --git a/lily/text-def.cc b/lily/text-def.cc index b440003fd2..cd2961b65e 100644 --- a/lily/text-def.cc +++ b/lily/text-def.cc @@ -11,7 +11,7 @@ Text_def::Text_def() defined_ch_c_l_ = 0; } bool -Text_def::compare(const Text_def&def) +Text_def::compare(Text_def const &def) { return align_i_ == def.align_i_ && text_str_ == def.text_str_ && style_str_ == def.style_str_; diff --git a/lily/version.cc b/lily/version.cc index 5b24591c5b..eed3e39ca8 100644 --- a/lily/version.cc +++ b/lily/version.cc @@ -2,7 +2,7 @@ #include "string.hh" -extern const char* lily_version_sz(); +extern char const * lily_version_sz(); String get_version_str()