]> git.donarmstrong.com Git - lilypond.git/commitdiff
More C++.
authorWerner Lemberg <wl@gnu.org>
Sat, 27 Dec 2008 08:23:23 +0000 (09:23 +0100)
committerWerner Lemberg <wl@gnu.org>
Sat, 27 Dec 2008 08:23:23 +0000 (09:23 +0100)
33 files changed:
flower/file-cookie.cc
flower/memory-stream.cc
lily/accidental-engraver.cc
lily/auto-beam-engraver.cc
lily/beam.cc
lily/box.cc
lily/context.cc
lily/custos-engraver.cc
lily/engraver.cc
lily/figured-bass-position-engraver.cc
lily/fingering-engraver.cc
lily/font-metric.cc
lily/general-scheme.cc
lily/key-engraver.cc
lily/ly-module.cc
lily/lyric-combine-music-iterator.cc
lily/melody-engraver.cc
lily/minimal-page-breaking.cc
lily/module-scheme.cc
lily/new-fingering-engraver.cc
lily/optimal-page-breaking.cc
lily/output-def.cc
lily/pango-font.cc
lily/paper-outputter.cc
lily/prob.cc
lily/relative-octave-music.cc
lily/rest.cc
lily/scale.cc
lily/scm-hash.cc
lily/spacing-basic.cc
lily/spring-smob.cc
lily/stem.cc
lily/translator-dispatch-list.cc

index 49b5518f362264b6740476336b55ca6036a2eba3..bedb100a00b26b4ac246e7948dd4c3166795f8f2 100644 (file)
@@ -15,12 +15,10 @@ extern "C" {
   }
 
   void *
-  lily_fopencookie (void *cookie, char const *modes,
-                   lily_cookie_io_functions_t io_funcs)
+  lily_fopencookie (void *cookie,
+                   char const * /* modes */,
+                   lily_cookie_io_functions_t /* io_funcs */)
   {
-    (void) cookie;
-    (void) modes;
-    (void) io_funcs;
     assert (is_memory_stream (cookie));
     return (FILE *) cookie;
   }
index 270438dcae5257286c808657bea047bb91c8a642..dbf6fd83f29555605f4fe42fc7ca5c8f77d3a86c 100644 (file)
@@ -102,23 +102,19 @@ Memory_out_stream::writer (void *cookie,
 }
 
 ssize_t
-Memory_out_stream::reader (void *cookie,
-                          char *buffer,
-                          size_t size)
+Memory_out_stream::reader (void * /* cookie */,
+                          char * /* buffer */,
+                          size_t /* size */)
 {
-  (void) cookie;
-  (void) buffer;
-  (void) size;
-
   assert (false);
   return 0;
 }
 
 int
-Memory_out_stream::seeker (void *, off64_t *, int whence)
+Memory_out_stream::seeker (void *,
+                          off64_t *,
+                          int)
 {
-  (void) whence;
-
   assert (false);
   return 0;
 }
index 457fd734c4ce87442e83403718b67a2ca94174f5..7fcea1ccfe003a658927816bee7927b495258dce 100644 (file)
@@ -411,13 +411,11 @@ Accidental_engraver::create_accidental (Accidental_entry *entry,
 }
 
 Grob *
-Accidental_engraver::make_standard_accidental (Stream_event *note,
+Accidental_engraver::make_standard_accidental (Stream_event * /* note */,
                                               Grob *note_head,
                                               Engraver *trans,
                                               bool cautionary)
 {
-  (void)note;
-
   /*
     We construct the accidentals at the originating Voice
     level, so that we get the property settings for
@@ -455,12 +453,10 @@ Accidental_engraver::make_standard_accidental (Stream_event *note,
 }
 
 Grob *
-Accidental_engraver::make_suggested_accidental (Stream_event *note,
+Accidental_engraver::make_suggested_accidental (Stream_event * /* note */,
                                                Grob *note_head,
                                                Engraver *trans)
 {
-  (void) note;
-
   Grob *a = trans->make_item ("AccidentalSuggestion", note_head->self_scm ());
 
   Side_position_interface::add_support (a, note_head);
index f86edaecc88eceddb74e17dea010458a24fa826f..af4f1fc2d9fc6ae4fae6ad689fe39bcb6df0ea80 100644 (file)
@@ -302,27 +302,24 @@ Auto_beam_engraver::finalize ()
 
 
 void
-Auto_beam_engraver::acknowledge_beam (Grob_info info)
+Auto_beam_engraver::acknowledge_beam (Grob_info /* info */)
 {
-  (void)info;
   check_bar_property ();
   if (stems_)
     end_beam ();
 }
 
 void
-Auto_beam_engraver::acknowledge_bar_line (Grob_info info)
+Auto_beam_engraver::acknowledge_bar_line (Grob_info /* info */)
 {
-  (void)info;
   check_bar_property ();
   if (stems_)
     end_beam ();
 }
 
 void
-Auto_beam_engraver::acknowledge_rest (Grob_info info)
+Auto_beam_engraver::acknowledge_rest (Grob_info /* info */)
 {
-  (void)info;
   check_bar_property ();
   if (stems_)
     end_beam ();
index c8adf5694d80f60f8ed2a4121d84d87ada830911..dcca55322795e4b58816788306f646a83f6d8fb2 100644 (file)
@@ -893,10 +893,8 @@ Beam::no_visible_stem_positions (Grob *me, Interval default_value)
 */
 MAKE_SCHEME_CALLBACK (Beam, calc_least_squares_positions, 2);
 SCM
-Beam::calc_least_squares_positions (SCM smob, SCM posns)
+Beam::calc_least_squares_positions (SCM smob, SCM /* posns */)
 {
-  (void) posns;
-  
   Grob *me = unsmob_grob (smob);
 
   int count = normal_stem_count (me);
index 5cce139fd4154b28625de8eb571bfb8f64034d4f..5c2af4d317b41f871b215450cd1925e8ce7a064f 100644 (file)
@@ -88,16 +88,14 @@ IMPLEMENT_TYPE_P (Box, "ly:box?");
 IMPLEMENT_DEFAULT_EQUAL_P (Box);
 
 SCM
-Box::mark_smob (SCM x)
+Box::mark_smob (SCM /* x */)
 {
-  (void)x;
   return SCM_EOL;
 }
 
 int
-Box::print_smob (SCM x, SCM p, scm_print_state*)
+Box::print_smob (SCM /* x */, SCM p, scm_print_state*)
 {
-  (void)x;
   scm_puts ("#<Box>", p);
   return 1;
 }
index 36e506cd7e01d88891b57ac5c68f6817183eafc5..a1456a1bbf71924e29b0c46b34e802910718a0d4 100644 (file)
@@ -46,9 +46,8 @@ Context::check_removal ()
     }
 }
 
-Context::Context (Context const &src)
+Context::Context (Context const & /* src */)
 {
-  (void) src;
   assert (false);
 }
 
index 8b5eb08ef816afb86b1469f6254b71578ef4e3f0..578f57266e8b37da7df0e9c65dc4d11836063d4b 100644 (file)
@@ -65,9 +65,8 @@ Custos_engraver::start_translation_timestep ()
 }
 
 void
-Custos_engraver::acknowledge_bar (Grob_info info)
+Custos_engraver::acknowledge_bar (Grob_info /* info */)
 {
-  (void) info;
   custos_permitted_ = true;
 }
 
index dcda3031b4835508dd14b6b5524b2b3d60603792..9ac54f804ecb1bba74fc3db46c6380a44cb5eb4e 100644 (file)
@@ -106,13 +106,19 @@ LY_DEFINE (ly_set_grob_creation_callback, "ly:set-grob-creation-callback",
 #endif
 
 Grob *
-Engraver::internal_make_grob (SCM symbol, SCM cause, char const *name, char const *file, int line, char const *fun)
+Engraver::internal_make_grob (SCM symbol,
+                             SCM cause,
+                             char const * /* name */,
+                             char const *file,
+                             int line,
+                             char const *fun)
 {
-  (void) file;
-  (void) fun;
-  (void) line;
-  (void) name;
-  
+#ifdef NDEBUG
+  (void)file;
+  (void)line;
+  (void)fun;
+#endif
+
   SCM props = updated_grob_properties (context (), symbol);
 
   Grob *grob = 0;
index fadb5f1cb3ccab5f4816a9240c92a6b3a594fdcd..15d1278fbd691846593e3cdfc6e2db5ade8b5ba1 100644 (file)
@@ -115,9 +115,8 @@ Figured_bass_position_engraver::stop_translation_timestep ()
 }
 
 void
-Figured_bass_position_engraver::acknowledge_end_bass_figure_alignment (Grob_info info)
+Figured_bass_position_engraver::acknowledge_end_bass_figure_alignment (Grob_info /* info */)
 {
-  (void)info;
   stop_spanner ();
 }
 
index 1c4107e686294ffd345fb9c572d2342762f7366f..b48f38924f639f8e256254d95394531a03768105 100644 (file)
@@ -45,14 +45,13 @@ Fingering_engraver::listen_fingering (Stream_event *ev)
 
 IMPLEMENT_TRANSLATOR_LISTENER (Fingering_engraver, stroke_finger);
 void
-Fingering_engraver::listen_stroke_finger (Stream_event *ev)
+Fingering_engraver::listen_stroke_finger (Stream_event * /* ev */)
 {
   /*
     FIXME: should do something.
     
     This function is mainly here to shut up a warning
    */
-  (void)ev;
 }
 
 void
index 9901f4c38292987ab9376ac524d1c2e2e53a8a6c..d9ccecbc91430826aae2eb90db2fdd400ac35217 100644 (file)
@@ -185,9 +185,8 @@ Font_metric::word_stencil (string str) const
 }
 
 Stencil
-Font_metric::text_stencil (string str) const
+Font_metric::text_stencil (string /* str */) const
 {
-  (void) str;
   programming_error("Cannot get a text stencil from this font");
   return Stencil (Box (), SCM_EOL);
 }
index 3e1052aed37cc674e2007464d964188e0ff731ff..94c05ee6073a2ea03cf19b70f0de339f81069bc3 100644 (file)
@@ -345,10 +345,11 @@ LY_DEFINE (ly_stderr_redirect, "ly:stderr-redirect",
 }
 
 static SCM
-accumulate_symbol (void *closure, SCM key, SCM val, SCM result)
+accumulate_symbol (void * /* closure */,
+                  SCM key,
+                  SCM /* val */,
+                  SCM result)
 {
-  (void) closure;
-  (void) val;
   return scm_cons (key, result);
 }
 
index 7997d11c33adb98e655d189691f211afd9714d0d..45300af68628efd9bbcf3c5c4321d2d4a3de07e9 100644 (file)
@@ -119,18 +119,16 @@ Key_engraver::listen_key_change (Stream_event *ev)
 }
 
 void
-Key_engraver::acknowledge_clef (Grob_info info)
+Key_engraver::acknowledge_clef (Grob_info /* info */)
 {
-  (void)info;
   SCM c = get_property ("createKeyOnClefChange");
   if (to_boolean (c))
     create_key (false);
 }
 
 void
-Key_engraver::acknowledge_bar_line (Grob_info info)
+Key_engraver::acknowledge_bar_line (Grob_info /* info */)
 {
-  (void)info;
   if (scm_is_pair (get_property ("keySignature")))
     create_key (true);
 }
index 4d6b0a8f97bbc4cf2c67facd49b02ee5eb18e0ac..eb73cd68cd208babfb4051eec39d6fdcd117335f 100644 (file)
@@ -97,9 +97,11 @@ ly_module_symbols (SCM mod)
 }
 
 static SCM
-entry_to_alist (void *closure, SCM key, SCM val, SCM result)
+entry_to_alist (void * /* closure */,
+               SCM key,
+               SCM val,
+               SCM result)
 {
-  (void) closure;
   if (scm_variable_bound_p (val) == SCM_BOOL_T)
     return scm_cons (scm_cons (key, scm_variable_ref (val)), result);
   programming_error ("unbound variable in module");
@@ -134,9 +136,11 @@ ly_reexport_module (SCM mod)
 
 #ifdef MODULE_GC_KLUDGE
 static SCM
-redefine_keyval (void *closure, SCM key, SCM val, SCM result)
+redefine_keyval (void * /* closure */,
+                SCM key,
+                SCM val,
+                SCM result)
 {
-  (void)closure;
   SCM new_tab = result;
   scm_hashq_set_x (new_tab, key, val);
   return new_tab;
index 26a4dfa5871a2d23cfaa3d6a21ad5e6c49bfd8d2..b75d309f2a7c6c79bf7d66a2e1d5269d45023a69 100644 (file)
@@ -260,10 +260,8 @@ Lyric_combine_music_iterator::find_voice ()
 }
 
 void
-Lyric_combine_music_iterator::process (Moment when)
+Lyric_combine_music_iterator::process (Moment /* when */)
 {
-  (void) when;
-  
   /* see if associatedVoice has been changed */
   Context *new_voice = find_voice ();
   if (new_voice)
index 5189f674b50a29bd6a1f0ea0cc3084982f8a516d..9957185f04d10c6e3a1f9f6b54e97d5072c75b92 100644 (file)
@@ -62,9 +62,8 @@ Melody_engraver::stop_translation_timestep ()
 
 
 void
-Melody_engraver::acknowledge_slur (Grob_info info)
+Melody_engraver::acknowledge_slur (Grob_info /* info */)
 {
-  (void)info;
   melody_item_ = 0;
 }
 
index 1b5fce910dae44ea0449066aa9be06820859643c..f26b4b5886ecb62619d196d7583b909bb5a2311d 100644 (file)
@@ -15,9 +15,8 @@
 #include "paper-book.hh"
 
 static bool
-is_break (Grob *g)
+is_break (Grob *)
 {
-  (void) g; /* shutup warning */
   return false;
 }
 
index 173226ac15e4a99a95ab825b5dc5fb9d340ac400..627504d922c8cfcd65971eca37a625b29abb2e38 100644 (file)
 */
 
 static SCM
-module_define_closure_func (void *closure, SCM key, SCM val, SCM result)
+module_define_closure_func (void *closure,
+                           SCM key,
+                           SCM val,
+                           SCM /* result */)
 {
-  (void) result;
   SCM module = (SCM) closure;
   if (scm_variable_bound_p (val) == SCM_BOOL_T)
     scm_module_define (module, key, scm_variable_ref (val));
index 5078e2d2db9f1bcd11139528f93c469703c80c33..cd9532206dca7892fb4fda3a39d6b52c982d6e22 100644 (file)
@@ -125,10 +125,8 @@ New_fingering_engraver::acknowledge_stem (Grob_info inf)
 void
 New_fingering_engraver::add_script (Grob *head,
                                    Stream_event *event,
-                                   Stream_event *note)
+                                   Stream_event * /* note */)
 {
-  (void) note;
-
   Finger_tuple ft;
 
   Grob *g = make_item ("Script", event->self_scm ());
index f495ab7fa6b6b23d84b21955dfd19598fad3e7ea..c5a61335633c6790f8bbdba7d83238fb5c521c01 100644 (file)
@@ -18,9 +18,8 @@
 #include "system.hh"
 
 static bool
-is_break (Grob *g)
+is_break (Grob *)
 {
-  (void) g; /* shutup warning */
   return false;
 }
 
index 1fcc5f596ed5464f029c6305f803542e6f083027..212731bd5f759193bbbccd8592e2efa3a72aedcc 100644 (file)
@@ -92,8 +92,6 @@ Output_def::print_smob (SCM s, SCM p, scm_print_state *)
   Output_def * def = unsmob_output_def (s);
   scm_puts ("#< ", p);
   scm_puts (def->class_name (), p);
-  
-  (void)def;
   scm_puts (">", p);
   return 1;
 }
index 611a5db5553cbdb342741ac85a1be6eeb1cf4e6c..138fd5cb0001c68ee7694892ad6ffd3d514d7796 100644 (file)
 #if HAVE_PANGO_FT2
 #include "stencil.hh"
 
-Pango_font::Pango_font (PangoFT2FontMap *fontmap,
+Pango_font::Pango_font (PangoFT2FontMap * /* fontmap */,
                        PangoFontDescription const *description,
                        Real output_scale)
 {
-  (void) fontmap;
-
   physical_font_tab_ = scm_c_make_hash_table (11);
   PangoDirection pango_dir = PANGO_DIRECTION_LTR;
   context_ = pango_ft2_get_context (PANGO_RESOLUTION,
index 5f02a7654923572f7e05aafc808a70495a0ceda5..d3b99055e9191d72a3e120d172697173d2acea6c 100644 (file)
@@ -55,9 +55,10 @@ Paper_outputter::mark_smob (SCM x)
 }
 
 int
-Paper_outputter::print_smob (SCM x, SCM p, scm_print_state*)
+Paper_outputter::print_smob (SCM /* x */,
+                            SCM p,
+                            scm_print_state *)
 {
-  (void) x;
   scm_puts ("#<Paper_outputter>", p);
   return 1;
 }
index e55e84afc100debf240b973d814d44a0b6885ba3..9d75d744f381cc45ffb2b02f732ce1ab3e56a325 100644 (file)
@@ -174,10 +174,9 @@ Prob::internal_set_property (SCM sym, SCM val)
 }
 
 void
-Prob::type_check_assignment (SCM sym, SCM val) const
+Prob::type_check_assignment (SCM, SCM) const
 {
-  (void) sym;
-  (void) val;
+  /* empty */
 }
 
 SCM
index bf6116ab17036e8b69ab2c263053320662bf121a..8d677c425b6b30ff3d43d64548fb06fb44e1ebc2 100644 (file)
@@ -19,9 +19,9 @@ public:
 
 MAKE_SCHEME_CALLBACK (Relative_octave_music, no_relative_callback, 2)
   SCM
-Relative_octave_music::no_relative_callback (SCM music, SCM pitch)
+Relative_octave_music::no_relative_callback (SCM /* music */,
+                                            SCM pitch)
 {
-  (void)music;
   return pitch;
 }
 
index da13f6cdbc599cc6ff458380f3890f586fd6010a..9caae1f5e93946030eb0adb2ae8b119932601599 100644 (file)
@@ -193,11 +193,10 @@ Rest::generic_extent_callback (Grob *me, Axis a)
 
 MAKE_SCHEME_CALLBACK (Rest, pure_height, 3);
 SCM
-Rest::pure_height (SCM smob, SCM start, SCM end)
+Rest::pure_height (SCM smob,
+                  SCM /* start */,
+                  SCM /* end */)
 {
-  (void) start;
-  (void) end;
-  
   Grob *me = unsmob_grob (smob);
   SCM m = brew_internal_stencil (me, false);
   return ly_interval2scm (unsmob_stencil (m)->extent (Y_AXIS));
index 9e39d8a99e83fa992a31c1be95fdb37a362c15ac..23490c889084cb2dff8192d1fb53fb939cbbec43 100644 (file)
@@ -121,19 +121,17 @@ Scale::normalize_step (int step) const
 }
 
 int
-Scale::print_smob (SCM x, SCM port, scm_print_state *)
+Scale::print_smob (SCM /* x */,
+                  SCM port,
+                  scm_print_state *)
 {
-  (void) x;
-  
   scm_puts ("#<Scale>", port); 
   return 1;
 }
 
-
 SCM
-Scale::mark_smob (SCM x)
+Scale::mark_smob (SCM)
 {
-  (void) x;
   return SCM_UNSPECIFIED;
 }
 
index ed3345b5acff86c055ef72b404c48e4be8f4c4a9..d3a8d7f9bd474b5bc6072bc17225b0fdcbf72758 100644 (file)
@@ -120,9 +120,11 @@ Scheme_hash_table::remove (SCM k)
 }
 
 static SCM
-collect_handles (void *closure, SCM key, SCM value, SCM result)
+collect_handles (void * /* closure */,
+                SCM key,
+                SCM value,
+                SCM result)
 {
-  (void) closure;
   return scm_acons(key, value, result);
 }
 
index 7545ec4e5b94723f384c94ed9753bcd2d3cbd7b4..40e0a16b4a152122ee3d88dabb7b7983ea9978a5 100644 (file)
@@ -83,11 +83,11 @@ get_measure_length (Grob *column)
 }
 
 Real
-Spacing_spanner::note_spacing (Grob *me, Grob *lc, Grob *rc,
+Spacing_spanner::note_spacing (Grob * /* me */,
+                              Grob *lc,
+                              Grob *rc,
                               Spacing_options const *options)
 {
-  (void) me;
-  
   Moment shortest_playing_len = 0;
   SCM s = lc->get_property ("shortest-playing-duration");
 
index ae4533cc219dc91e398a822c6f6ba93669133557..a50c4bf92f7fde405dd9ddc8eb9f64d060459b6a 100644 (file)
 IMPLEMENT_SIMPLE_SMOBS (Spring);
 
 SCM
-Spring::mark_smob (SCM x)
+Spring::mark_smob (SCM)
 {
-  (void)x;
-
   return SCM_UNSPECIFIED;
 }
 
index 1f8b21e85f51fec72fa86c818b24417dcde43298..3380d0cc17b1b14aec7e5d05b0d878faefc369b5 100644 (file)
@@ -229,11 +229,10 @@ Stem::is_normal_stem (Grob *me)
 
 MAKE_SCHEME_CALLBACK (Stem, pure_height, 3)
 SCM
-Stem::pure_height (SCM smob, SCM start, SCM end)
+Stem::pure_height (SCM smob,
+                  SCM /* start */,
+                  SCM /* end */)
 {
-  (void) start;
-  (void) end;
-
   Grob *me = unsmob_grob (smob);
   Interval iv;
 
index 4298ffedafd9a43be3125c7533347c632fcc81b0..5a6ce4a0a661e78779f293f60d64b64ef21bbb0d 100644 (file)
@@ -63,16 +63,16 @@ Engraver_dispatch_list::create (SCM trans_list,
 }
 
 SCM
-Engraver_dispatch_list::mark_smob (SCM x)
+Engraver_dispatch_list::mark_smob (SCM)
 {
-  (void)x;
   return SCM_BOOL_F;
 }
 
 int
-Engraver_dispatch_list::print_smob (SCM x, SCM p, scm_print_state *)
+Engraver_dispatch_list::print_smob (SCM /* x */,
+                                   SCM p,
+                                   scm_print_state *)
 {
-  (void)x;
   scm_puts ("#<Engraver_dispatch_list>", p);
   return 1;
 }