From c8b1471db44f5596f0e38e8e9efeaac67210fb86 Mon Sep 17 00:00:00 2001 From: janneke Date: Mon, 23 Feb 2004 13:58:22 +0000 Subject: [PATCH] * gcc-3.4 snapshot: 3.4.0 20040215 (prerelease) compile fixes, and stray style cleanups: * stepmake/stepmake/c++-vars.make (EXTRA_CXXFLAGS): Remove -Wmissing-prototypes. * flower/include/killing-cons.tcc (Killing_cons): Add template specifier for car_. * flower/include/parray.hh (binsearchs): Add template specifier for maxkey. * flower/include/interval.hh: Declare elem () with template specfier. --- ChangeLog | 18 ++++++++++- flower/include/drul-array.hh | 4 +-- flower/include/interval.hh | 45 +++++++++++++++------------ flower/include/interval.tcc | 26 +++++----------- flower/include/killing-cons.tcc | 2 +- flower/include/parray.hh | 2 +- flower/include/virtual-methods.hh | 34 ++++++++------------ lily/include/event.hh | 14 ++++----- lily/include/grace-music.hh | 2 +- lily/include/grob.hh | 12 +++---- lily/include/item.hh | 2 +- lily/include/lyric-combine-music.hh | 11 +++---- lily/include/midi-def.hh | 8 ++--- lily/include/music-list.hh | 18 +++++------ lily/include/music-output-def.hh | 6 ++-- lily/include/music-sequence.hh | 3 +- lily/include/music-wrapper.hh | 9 ++---- lily/include/music.hh | 13 +++++--- lily/include/paper-column.hh | 16 +++++----- lily/include/paper-def.hh | 2 +- lily/include/performer.hh | 10 +++--- lily/include/relative-music.hh | 4 +-- lily/include/relative-octave-check.hh | 6 ++-- lily/include/repeated-music.hh | 20 ++++++------ lily/include/spanner.hh | 3 +- lily/include/system.hh | 3 +- lily/include/time-scaled-music.hh | 13 ++++---- lily/include/translator-group.hh | 9 ++---- lily/include/translator.hh | 6 ++-- lily/include/transposed-music.hh | 8 ++--- lily/include/un-relativable-music.hh | 6 ++-- lily/include/untransposable-music.hh | 11 ++++--- stepmake/stepmake/c++-vars.make | 5 +-- 33 files changed, 175 insertions(+), 176 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04685d0c07..acbcfc5804 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2004-02-23 Jan Nieuwenhuizen + + * gcc-3.4 snapshot: 3.4.0 20040215 (prerelease) compile fixes, and + stray style cleanups: + + * stepmake/stepmake/c++-vars.make (EXTRA_CXXFLAGS): Remove + -Wmissing-prototypes. + + * flower/include/killing-cons.tcc (Killing_cons): Add template + specifier for car_. + + * flower/include/parray.hh (binsearchs): Add template specifier + for maxkey. + + * flower/include/interval.hh: Declare elem () with template specfier. + 2004-02-23 Heikki Junes * elisp/lilypond-indent.el (get-buffer-size): add customization @@ -24,7 +40,7 @@ 2004-02-22 Heikki Junes * elisp/lilypond-mode.el (get-buffer-size): define new function, - for Emacs >= 20 (Laurent Martelli). + for Emacs <= 20 (Laurent Martelli). 2004-02-21 Han-Wen Nienhuys diff --git a/flower/include/drul-array.hh b/flower/include/drul-array.hh index 8599576f6e..d537bcb5a0 100644 --- a/flower/include/drul-array.hh +++ b/flower/include/drul-array.hh @@ -26,7 +26,6 @@ struct Drul_array { assert (d==1 || d== -1); return array_[ (d+1)/2]; - } T &operator[] (Direction d) { @@ -43,7 +42,8 @@ struct Drul_array return elem (d); } Drul_array () - {} + { + } Drul_array (T t1, T t2) { array_[0] = t1; diff --git a/flower/include/interval.hh b/flower/include/interval.hh index eebe675f37..25b05ec01e 100644 --- a/flower/include/interval.hh +++ b/flower/include/interval.hh @@ -12,19 +12,18 @@ #include "real.hh" #include "drul-array.hh" -/** a T interval. this represents the closed interval [left,right]. - No invariants. T must be a totally ordered ring (with division, anyway ..) - At instantiation, the function infinity () has to be defined explicitely. - - */ +/* A T interval. This represents the closed interval [left,right]. + No invariants. T must be a totally ordered ring (with division, anyway ..) + At instantiation, the function infinity () has to be defined explicitely. */ template -struct Interval_t : public Drul_array { +struct Interval_t : public Drul_array +{ + Drul_array::elem; - /* ************** */ - - static T infinity () ; + static T infinity (); static String T_to_string (T arg); - T center () const { + T center () const + { assert (!is_empty ()); return (elem (LEFT) + elem (RIGHT)) / T (2); } @@ -45,21 +44,26 @@ struct Interval_t : public Drul_array { */ void unite (Interval_t h); void intersect (Interval_t h); - void add_point (T p) { + void add_point (T p) + { elem(LEFT) = elem (LEFT) ? p; } T length () const; T delta () const; - void set_empty () ; + void set_empty (); void set_full (); /* TODO: strip hungarian suffix. */ - bool is_empty () const { return elem (LEFT) > elem (RIGHT); } + bool is_empty () const + { + return elem (LEFT) > elem (RIGHT); + } bool superset (Interval_t const&) const; - Interval_t () { + Interval_t () + { set_empty (); } Interval_t (T m, T M) : Drul_array (m,M) @@ -87,21 +91,22 @@ struct Interval_t : public Drul_array { return *this; } - Real linear_combination (Real x) const { - Drul_array da (elem (LEFT), - elem (RIGHT)); + Real linear_combination (Real x) const + { + Drul_array da (elem (LEFT), elem (RIGHT)); return ::linear_combination (da, x); } - String to_string () const; + String to_string () const; bool contains (T r); - void negate () { + void negate () + { T r = -elem (LEFT); T l = -elem (RIGHT); elem (LEFT) = l; elem (RIGHT) =r; } - + void swap () { T t = elem (LEFT); diff --git a/flower/include/interval.tcc b/flower/include/interval.tcc index 2060c92ae7..e3d0f36a74 100644 --- a/flower/include/interval.tcc +++ b/flower/include/interval.tcc @@ -75,7 +75,7 @@ Interval_t::length () const if (elem (RIGHT) <= elem (LEFT)) return 0; else - return elem (RIGHT)-elem (LEFT); + return elem (RIGHT) - elem (LEFT); } template @@ -85,32 +85,22 @@ Interval_t::delta () const return elem (RIGHT) - elem (LEFT); } -/** - smallest Interval which includes *this and #h# - */ +/* smallest Interval which includes *this and #h# */ template void Interval_t::unite (Interval_t h) { elem (LEFT) = h.elem (LEFT) ?elem (RIGHT); - -#if 0 - if (h.elem (LEFT)elem (RIGHT)) - elem (RIGHT) = h.elem (RIGHT); -#endif + elem (RIGHT) = h.elem (RIGHT) >? elem (RIGHT); } - template void Interval_t::intersect (Interval_t h) { -#if defined (__GNUG__) && ! defined (__STRICT_ANSI__) +#if defined (__GNUG__) && !defined (__STRICT_ANSI__) elem (LEFT) = h.elem (LEFT) >? elem (LEFT); - elem (RIGHT) = h.elem (RIGHT) ::to_string () const return "[empty]"; String s ("["); - return s + T_to_string (elem (LEFT)) + String ("," ) + T_to_string (elem (RIGHT) ) + String ("]" ); + return (s + T_to_string (elem (LEFT)) + String ("," ) + + T_to_string (elem (RIGHT) ) + String ("]" )); } template @@ -143,8 +134,7 @@ Interval_t::contains (T r) return r >= elem (LEFT) && r <= elem (RIGHT); } - #define INTERVAL__INSTANTIATE(T) struct Interval_t;\ -template int Interval__compare (const Interval_t&,Interval_t const&) +template int Interval__compare (const Interval_t&,Interval_t const&) #endif // INTERVAL_TCC diff --git a/flower/include/killing-cons.tcc b/flower/include/killing-cons.tcc index ebf78d66b8..c02c35ad3b 100644 --- a/flower/include/killing-cons.tcc +++ b/flower/include/killing-cons.tcc @@ -15,7 +15,7 @@ template Killing_cons::~Killing_cons () { - delete car_; + delete Cons::car_; } template diff --git a/flower/include/parray.hh b/flower/include/parray.hh index e37a316503..f70d2197b2 100644 --- a/flower/include/parray.hh +++ b/flower/include/parray.hh @@ -242,7 +242,7 @@ binsearchs (Array const &arr, T t, int (*compare) (T const&,T const&)) int cmp; int result; lo = 0; - hi = maxkey; + hi = Array::maxkey; /* binary search */ do diff --git a/flower/include/virtual-methods.hh b/flower/include/virtual-methods.hh index 6d4d840879..d466eee89f 100644 --- a/flower/include/virtual-methods.hh +++ b/flower/include/virtual-methods.hh @@ -17,34 +17,26 @@ const char * demangle_classname (std::type_info const &); -/** +/* Virtual copy constructor. Make up for C++'s lack of a standard + factory or clone () function. Uses a typeof hack. Usage: - Virtual copy constructor. Make up for C++'s lack of a standard - clone () function. Uses a typeof hack. Usage: + class Foo : Baseclass + { + VIRTUAL_COPY_CONSTRUCTOR (Baseclass, Foo); + }; */ - class Foo : Baseclass { - VIRTUAL_COPY_CONS (Baseclass); - }; - - */ - -/* - fix constness: gcc-2.95 is correct in defining - - typeof (*this) - - in a const member function to be const -*/ -#define VIRTUAL_COPY_CONS(base) \ +#define VIRTUAL_COPY_CONSTRUCTOR(base, name) \ + /* Hack to fix constness: gcc >= 2.95 is correct in defining \ + typeof (*this) in a const member function to be const. */ \ virtual base* clone_const_helper () \ { \ - return new typeof (*this) (*this); \ + return new name (*this); \ } \ - virtual base* clone () const \ + virtual base *clone () const \ { \ - base* urg = (base*)this; \ + /* return new name (*this); */ \ + base *urg = (base*) this; \ return urg->clone_const_helper (); \ } - #endif /* VIRTUAL_METHODS_HH */ diff --git a/lily/include/event.hh b/lily/include/event.hh index c8d8795284..25e5210adc 100644 --- a/lily/include/event.hh +++ b/lily/include/event.hh @@ -18,15 +18,13 @@ #include "duration.hh" #include "pitch.hh" -/** An atom of musical information. This is an abstract class for any - piece of music that does not contain other Music. - - - */ -class Event : public Music { +/* An atom of musical information. This is an abstract class for any + piece of music that does not contain other Music. */ +class Event : public Music +{ public: Event (); - VIRTUAL_COPY_CONS (Music); + VIRTUAL_COPY_CONSTRUCTOR (Music, Event); virtual void compress (Moment); virtual void transpose (Pitch); virtual Moment get_length () const; @@ -43,7 +41,7 @@ public: SCM pitch_alist (); protected: - VIRTUAL_COPY_CONS (Music); + VIRTUAL_COPY_CONSTRUCTOR (Music, Key_change_ev); void transpose (Pitch d); }; diff --git a/lily/include/grace-music.hh b/lily/include/grace-music.hh index 273fefebe7..58548fe4ac 100644 --- a/lily/include/grace-music.hh +++ b/lily/include/grace-music.hh @@ -15,7 +15,7 @@ class Grace_music : public Music_wrapper { public: - VIRTUAL_COPY_CONS (Music); + VIRTUAL_COPY_CONSTRUCTOR (Music, Grace_music); Grace_music (); protected: virtual Moment get_length () const; diff --git a/lily/include/grob.hh b/lily/include/grob.hh index ce4c00264a..fbe0211c98 100644 --- a/lily/include/grob.hh +++ b/lily/include/grob.hh @@ -32,16 +32,16 @@ enum Grob_status { typedef void (Grob::*Grob_method_pointer) (void); -/* - Basic output object. -*/ -class Grob { +/* Basic G[raphical output] O[bject]. */ +class Grob +{ protected: SCM immutable_property_alist_; SCM mutable_property_alist_; friend class Spanner; void substitute_mutable_properties(SCM,SCM); + public: Grob *original_; @@ -64,6 +64,8 @@ public: Grob (SCM basic_props); Grob (Grob const&); + VIRTUAL_COPY_CONSTRUCTOR (Grob, Grob); + String name () const; /* @@ -88,8 +90,6 @@ public: void add_dependency (Grob*); virtual System * get_system () const; - VIRTUAL_COPY_CONS (Grob); - /** Recursively track all dependencies of this Grob. The status_ field is used as a mark-field. It is marked with diff --git a/lily/include/item.hh b/lily/include/item.hh index d446773244..3b728beb03 100644 --- a/lily/include/item.hh +++ b/lily/include/item.hh @@ -26,9 +26,9 @@ class Item : public Grob Drul_array broken_to_drul_; public: - VIRTUAL_COPY_CONS (Grob); Item (SCM); Item (Item const &); + VIRTUAL_COPY_CONSTRUCTOR (Grob, Item); static bool is_breakable (Grob *); bool is_broken () const; diff --git a/lily/include/lyric-combine-music.hh b/lily/include/lyric-combine-music.hh index a64f42c694..566dc9a93f 100644 --- a/lily/include/lyric-combine-music.hh +++ b/lily/include/lyric-combine-music.hh @@ -9,19 +9,18 @@ #ifndef LYRIC_COMBINE_MUSIC_HH #define LYRIC_COMBINE_MUSIC_HH -#include "music.hh" +#include "music.hh" class Lyric_combine_music : public Music { public: - Music * get_music () const; - Music * get_lyrics () const; - Lyric_combine_music (); + VIRTUAL_COPY_CONSTRUCTOR (Music, Lyric_combine_music); - VIRTUAL_COPY_CONS (Music); + Music *get_music () const; + Music *get_lyrics () const; virtual Moment get_length () const; }; -#endif /* LYRIC_COMBINE_MUSIC_HH */ +#endif /* LYRIC_COMBINE_MUSIC_HH */ diff --git a/lily/include/midi-def.hh b/lily/include/midi-def.hh index 514f0cc585..c919a87606 100644 --- a/lily/include/midi-def.hh +++ b/lily/include/midi-def.hh @@ -19,16 +19,16 @@ /** definitions for midi output. Rather empty */ -class Midi_def : public Music_output_def { +class Midi_def : public Music_output_def +{ static int score_count_; public: - VIRTUAL_COPY_CONS (Music_output_def); - Midi_def (); + VIRTUAL_COPY_CONSTRUCTOR (Music_output_def, Midi_def); int get_tempo (Moment moment); void set_tempo (Moment moment, int count_per_minute_i); }; -#endif // MIDI_DEF_HH +#endif /* MIDI_DEF_HH */ diff --git a/lily/include/music-list.hh b/lily/include/music-list.hh index e9fc937584..c77cccd70f 100644 --- a/lily/include/music-list.hh +++ b/lily/include/music-list.hh @@ -1,6 +1,5 @@ /* - music-list.hh -- declare Music_sequence, - Simultaneous_music and Sequential_music + music-list.hh -- declare Simultaneous_music, Sequential_music, Event_chord source file of the GNU LilyPond music typesetter @@ -8,8 +7,8 @@ */ -#ifndef Music_sequence_HH -#define Music_sequence_HH +#ifndef MUSIC_LIST_HH +#define MUSIC_LIST_HH #include "music-sequence.hh" @@ -19,11 +18,12 @@ class Simultaneous_music : public Music_sequence { public: - VIRTUAL_COPY_CONS (Music); + Simultaneous_music (); + VIRTUAL_COPY_CONSTRUCTOR (Music, Simultaneous_music); + virtual Pitch to_relative_octave (Pitch); virtual Moment get_length () const; virtual Moment start_mom () const; - Simultaneous_music (); }; /* @@ -32,7 +32,7 @@ public: class Event_chord : public Simultaneous_music { public: - VIRTUAL_COPY_CONS (Music); + VIRTUAL_COPY_CONSTRUCTOR (Music, Event_chord); virtual Pitch to_relative_octave (Pitch); }; @@ -42,11 +42,11 @@ public: class Sequential_music : public Music_sequence { public: - VIRTUAL_COPY_CONS (Music); + VIRTUAL_COPY_CONSTRUCTOR (Music, Sequential_music); virtual Moment get_length () const; virtual Moment start_mom () const; Sequential_music (); }; -#endif // Music_sequence_HH +#endif /* MUSIC_LIST_HH */ diff --git a/lily/include/music-output-def.hh b/lily/include/music-output-def.hh index 9a6e2d4844..3160e65a4b 100644 --- a/lily/include/music-output-def.hh +++ b/lily/include/music-output-def.hh @@ -27,17 +27,17 @@ public: SCM scope_; SCM scaled_fonts_; - VIRTUAL_COPY_CONS (Music_output_def); Music_output_def (Music_output_def const&); Music_output_def (); + VIRTUAL_COPY_CONSTRUCTOR (Music_output_def, Music_output_def); Context *get_group_translator (String type) const; void assign_translator (SCM transdef); SCM find_context_def (SCM name) const; String outname_string () ; SCM get_scmvar (String id)const; - SCM lookup_variable (SCM sym) const; - void set_variable (SCM, SCM sym); + SCM lookup_variable (SCM sym) const; + void set_variable (SCM, SCM sym); DECLARE_SMOBS (Music_output_def,); }; diff --git a/lily/include/music-sequence.hh b/lily/include/music-sequence.hh index beed7d3ada..01753fd41a 100644 --- a/lily/include/music-sequence.hh +++ b/lily/include/music-sequence.hh @@ -18,9 +18,10 @@ class Music_sequence : public Music public: Music_sequence (SCM h); Music_sequence (); + VIRTUAL_COPY_CONSTRUCTOR (Music, Music_sequence); + SCM music_list () const; void append_music (Music *); - VIRTUAL_COPY_CONS (Music); Pitch do_relative_octave (Pitch p, bool b); diff --git a/lily/include/music-wrapper.hh b/lily/include/music-wrapper.hh index aa7b53937a..ac7483f0ff 100644 --- a/lily/include/music-wrapper.hh +++ b/lily/include/music-wrapper.hh @@ -23,15 +23,12 @@ class Music_wrapper : public Music { public: Music_wrapper (); - Music * element () const; - - VIRTUAL_COPY_CONS (Music); + VIRTUAL_COPY_CONSTRUCTOR (Music, Music_wrapper); + + Music *element () const; virtual Moment get_length () const; virtual Moment start_mom () const; }; - - - #endif /* MUSIC_WRAPPER_HH */ diff --git a/lily/include/music.hh b/lily/include/music.hh index a7e3e804eb..8d96b195c6 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -34,8 +34,13 @@ TODO: make a equalp function for general music. */ -class Music { +class Music +{ public: + Music (); + Music (Music const &m); + VIRTUAL_COPY_CONSTRUCTOR (Music, Music); + Input *origin () const; void set_spot (Input); @@ -45,7 +50,7 @@ public: bool internal_is_music_type (SCM) const; virtual Pitch to_relative_octave (Pitch); - String name ()const; + String name () const; /// The duration of this piece of music virtual Moment get_length () const; virtual Moment start_mom () const; @@ -55,9 +60,7 @@ public: /// Scale the music in time by #factor#. virtual void compress (Moment factor); - VIRTUAL_COPY_CONS (Music); - Music (); - Music (Music const &m); + protected: DECLARE_SMOBS (Music,); SCM immutable_property_alist_; diff --git a/lily/include/paper-column.hh b/lily/include/paper-column.hh index 7275af9fd9..935e7b8fe4 100644 --- a/lily/include/paper-column.hh +++ b/lily/include/paper-column.hh @@ -17,23 +17,23 @@ class Paper_column : public Item { public: - VIRTUAL_COPY_CONS (Grob); + int rank_; + /// if lines are broken then this column is in #line# + System *system_; + + Paper_column (SCM); + VIRTUAL_COPY_CONSTRUCTOR (Grob, Paper_column); static bool has_interface (Grob*); - int rank_; virtual void do_break_processing (); virtual Paper_column *get_column () const; virtual System *get_system () const; - /// if lines are broken then this column is in #line# - System *system_; - static int get_rank (Grob*); - DECLARE_SCHEME_CALLBACK(print, (SCM)); - DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM)); + DECLARE_SCHEME_CALLBACK (print, (SCM)); + DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM)); - Paper_column (SCM); static bool is_musical (Grob *); static Moment when_mom (Grob*); diff --git a/lily/include/paper-def.hh b/lily/include/paper-def.hh index a95c307c72..aad477aaf4 100644 --- a/lily/include/paper-def.hh +++ b/lily/include/paper-def.hh @@ -46,7 +46,7 @@ class Paper_def : public Music_output_def { protected: - VIRTUAL_COPY_CONS (Music_output_def); + VIRTUAL_COPY_CONSTRUCTOR (Music_output_def, Paper_def); public: Paper_outputter* get_paper_outputter (String) const; diff --git a/lily/include/performer.hh b/lily/include/performer.hh index 04ecba2d55..40e5695f59 100644 --- a/lily/include/performer.hh +++ b/lily/include/performer.hh @@ -14,14 +14,12 @@ #include "grob-info.hh" #include "translator.hh" -/** - Convert a music definition into a audio representation. - A baseclass - */ +/* Convert a music definition into a audio representation. + A baseclass. */ class Performer : public virtual Translator { public: - VIRTUAL_COPY_CONS (Translator); + VIRTUAL_COPY_CONSTRUCTOR (Translator, Performer); friend class Performer_group_performer; Performer_group_performer* get_daddy_performer () const; @@ -34,5 +32,5 @@ protected: }; -#endif // PERFORMER_HH +#endif /* PERFORMER_HH */ diff --git a/lily/include/relative-music.hh b/lily/include/relative-music.hh index aca53b64ee..eebc43e4f1 100644 --- a/lily/include/relative-music.hh +++ b/lily/include/relative-music.hh @@ -16,8 +16,8 @@ class Relative_octave_music : public Music_wrapper { public: Relative_octave_music (); - - VIRTUAL_COPY_CONS (Music); + VIRTUAL_COPY_CONSTRUCTOR (Music, Relative_octave_music); + virtual Pitch to_relative_octave (Pitch); }; diff --git a/lily/include/relative-octave-check.hh b/lily/include/relative-octave-check.hh index b6ac316523..72cf3e2a12 100644 --- a/lily/include/relative-octave-check.hh +++ b/lily/include/relative-octave-check.hh @@ -15,11 +15,11 @@ class Relative_octave_check : public Music { public: - VIRTUAL_COPY_CONS(Music); + VIRTUAL_COPY_CONSTRUCTOR (Music, Relative_octave_check); + virtual Pitch to_relative_octave (Pitch); }; - -#endif /* RELATIVE_MUSIC_HH */ +#endif /* RELATIVE_OCTAVE_CHECK_HH */ diff --git a/lily/include/repeated-music.hh b/lily/include/repeated-music.hh index d2d5ae387e..e84b1d2fbc 100644 --- a/lily/include/repeated-music.hh +++ b/lily/include/repeated-music.hh @@ -7,8 +7,8 @@ */ -#ifndef RepEATED_MUSIC_HH -#define RepEATED_MUSIC_HH +#ifndef REPEATED_MUSIC_HH +#define REPEATED_MUSIC_HH #include "music.hh" @@ -49,11 +49,15 @@ class Repeated_music : public Music { public: - Music * body () const; + Repeated_music (); + Repeated_music (SCM); + VIRTUAL_COPY_CONSTRUCTOR (Music, Repeated_music); + + Music *body () const; SCM alternatives () const; - /// how often do we repeat? - int repeat_count ( ) const; + /* How often do we repeat? */ + int repeat_count () const; virtual Pitch to_relative_octave (Pitch); Moment body_get_length () const; @@ -65,11 +69,7 @@ public: DECLARE_SCHEME_CALLBACK (folded_music_length, (SCM)); DECLARE_SCHEME_CALLBACK (minimum_start, (SCM)); DECLARE_SCHEME_CALLBACK (first_start, (SCM)); - - VIRTUAL_COPY_CONS (Music); - Repeated_music (); - Repeated_music (SCM); }; -#endif /* RepEATED_MUSIC_HH */ +#endif /* REPEATED_MUSIC_HH */ diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index f6634e29f3..f04c3aca56 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -59,10 +59,11 @@ public: virtual SCM do_derived_mark () const; static bool has_interface (Grob*); virtual System *get_system () const; + protected: void set_my_columns (); - VIRTUAL_COPY_CONS (Grob); + VIRTUAL_COPY_CONSTRUCTOR (Grob, Spanner); virtual void do_break_processing (); }; diff --git a/lily/include/system.hh b/lily/include/system.hh index 8f1506a78e..a9b24b6f2c 100644 --- a/lily/include/system.hh +++ b/lily/include/system.hh @@ -42,8 +42,9 @@ public: void output_stencil (SCM, Offset); void output_scheme (SCM); void pre_processing (); + protected: - VIRTUAL_COPY_CONS (Grob); + VIRTUAL_COPY_CONSTRUCTOR (Grob, System); }; #endif /* SYSTEM_HH */ diff --git a/lily/include/time-scaled-music.hh b/lily/include/time-scaled-music.hh index bb900be40a..efc62bb1bd 100644 --- a/lily/include/time-scaled-music.hh +++ b/lily/include/time-scaled-music.hh @@ -1,5 +1,5 @@ /* - compressed-music.hh -- declare Time_scaled_music + time-scaled-music.hh -- declare Time_scaled_music source file of the GNU LilyPond music typesetter @@ -7,8 +7,8 @@ */ -#ifndef Time_scaled_music_HH -#define Time_scaled_music_HH +#ifndef TIME_SCALED_MUSIC_HH +#define TIME_SCALED_MUSIC_HH #include "music-wrapper.hh" /** @@ -17,11 +17,10 @@ class Time_scaled_music : public Music_wrapper { public: - Time_scaled_music (SCM); Time_scaled_music (); - - VIRTUAL_COPY_CONS (Music); + Time_scaled_music (SCM); + VIRTUAL_COPY_CONSTRUCTOR (Music, Time_scaled_music); }; -#endif /* Time_scaled_music_HH */ +#endif /* TIME_SCALED_MUSIC_HH */ diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index b302aefcdb..f0ec7b3e2b 100644 --- a/lily/include/translator-group.hh +++ b/lily/include/translator-group.hh @@ -19,13 +19,10 @@ typedef void (Translator::*Translator_method) (void); -class Translator_group : public virtual Translator { -protected: - -public: - VIRTUAL_COPY_CONS (Translator); - +class Translator_group : public virtual Translator +{ public: + VIRTUAL_COPY_CONSTRUCTOR (Translator, Translator_group); virtual Translator_group* get_daddy_translator ()const; virtual SCM get_simple_trans_list (); virtual bool try_music (Music* req); diff --git a/lily/include/translator.hh b/lily/include/translator.hh index 923cf2f639..de406a3db4 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -23,8 +23,8 @@ #define TRANSLATOR_DECLARATIONS(NAME) \ public: \ - NAME();\ - VIRTUAL_COPY_CONS (Translator); \ + NAME (); \ + VIRTUAL_COPY_CONSTRUCTOR (Translator, NAME); \ static SCM static_description_; \ virtual SCM static_translator_description () const; \ virtual SCM translator_description () const; @@ -49,9 +49,11 @@ public: public: DECLARE_SMOBS (Translator, dummy); + protected: // should be private. SCM simple_trans_list_; friend class Context_def; + public: Score_context * get_score_context () const; Global_context * get_global_context () const; diff --git a/lily/include/transposed-music.hh b/lily/include/transposed-music.hh index b5723860f9..d355fb045a 100644 --- a/lily/include/transposed-music.hh +++ b/lily/include/transposed-music.hh @@ -10,17 +10,15 @@ #ifndef TRANSPOSED_MUSIC_HH #define TRANSPOSED_MUSIC_HH - #include "music-wrapper.hh" class Transposed_music : public Music_wrapper { public: - Transposed_music (SCM); Transposed_music (); - - - VIRTUAL_COPY_CONS (Music); + Transposed_music (SCM); + VIRTUAL_COPY_CONSTRUCTOR (Music, Transposed_music); + virtual Pitch to_relative_octave (Pitch); }; diff --git a/lily/include/un-relativable-music.hh b/lily/include/un-relativable-music.hh index 8f4eff56b2..b927a8a133 100644 --- a/lily/include/un-relativable-music.hh +++ b/lily/include/un-relativable-music.hh @@ -1,5 +1,5 @@ /* - un-relativable-music.hh -- declare + un-relativable-music.hh -- declare Un_relativable_music source file of the GNU LilyPond music typesetter @@ -16,10 +16,10 @@ class Un_relativable_music: public Music_wrapper { public: Un_relativable_music (); + VIRTUAL_COPY_CONSTRUCTOR (Music, Un_relativable_music); + Pitch to_relative_octave (Pitch); - VIRTUAL_COPY_CONS(Music); }; - #endif /* UN_RELATIVABLE_MUSIC_HH */ diff --git a/lily/include/untransposable-music.hh b/lily/include/untransposable-music.hh index 465acc3dc3..f5a4a9f5db 100644 --- a/lily/include/untransposable-music.hh +++ b/lily/include/untransposable-music.hh @@ -1,24 +1,25 @@ - /* -untransposable-music.hh -- declare + untransposable-music.hh -- declare Untransposable_music -source file of the GNU LilyPond music typesetter + source file of the GNU LilyPond music typesetter -(c) 2001--2004 Han-Wen Nienhuys + (c) 2001--2004 Han-Wen Nienhuys */ #ifndef UNTRANSPOSABLE_MUSIC_HH #define UNTRANSPOSABLE_MUSIC_HH + #include "music-wrapper.hh" class Untransposable_music : public Music_wrapper { public: Untransposable_music (); + VIRTUAL_COPY_CONSTRUCTOR (Music, Untransposable_music); + virtual Pitch to_relative_octave (Pitch); virtual void transpose (Pitch); - VIRTUAL_COPY_CONS(Music); }; diff --git a/stepmake/stepmake/c++-vars.make b/stepmake/stepmake/c++-vars.make index 901e041b6b..3f8c5803a6 100644 --- a/stepmake/stepmake/c++-vars.make +++ b/stepmake/stepmake/c++-vars.make @@ -4,9 +4,10 @@ include $(stepdir)/compile-vars.make # added two warnings that are treated by cygwin32's gcc 2.7.2 as errors. # huh, but still, no warnings even provoced with linux's gcc 2.7.2.1? -# -pipe makes it go faster, but is not supported on all platforms. +# -pipe makes it go faster, but is not supported on all platforms. +# how much faster -- would this warrant configure check? # EXTRA_CXXFLAGS= -Wall -Winline -W -Wmissing-prototypes -Wmissing-declarations -Wconversion -EXTRA_CXXFLAGS= -Wall -W -Wmissing-prototypes -Wconversion +EXTRA_CXXFLAGS= -W -Wall -Wconversion ALL_CXXFLAGS = $(CXXFLAGS) $(ICFLAGS) $(DEFINES) $(addprefix -I,$(INCLUDES)) $(USER_CFLAGS) $(EXTRA_CFLAGS) $(MODULE_CFLAGS) $($(PACKAGE)_CFLAGS) $($(PACKAGE)_CXXFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS) -- 2.39.2