From ae9943e466d3b718bc96a858438f43cd23d62fec Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 27 Jan 2007 14:27:44 +0100 Subject: [PATCH] typechecking tweaks. --- lily/function-documentation.cc | 5 ++++- lily/score-scheme.cc | 1 - lily/text-interface.cc | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lily/function-documentation.cc b/lily/function-documentation.cc index f210c6ef15..6c6e2eb7b6 100644 --- a/lily/function-documentation.cc +++ b/lily/function-documentation.cc @@ -75,7 +75,10 @@ string predicate_to_typename (void *ptr) { if (type_names.find (ptr) == type_names.end ()) - return "unknown type"; + { + programming_error ("Unknown type predicate"); + return "unknown type"; + } else return type_names[ptr]; } diff --git a/lily/score-scheme.cc b/lily/score-scheme.cc index 6206011dda..83111f6707 100644 --- a/lily/score-scheme.cc +++ b/lily/score-scheme.cc @@ -21,7 +21,6 @@ LY_DEFINE (ly_make_score, "ly:make-score", "Return score with @var{music} encapsulated in @var{score}.") { LY_ASSERT_SMOB (Music, music, 1); - Music *mus = unsmob_music (music); Score *score = new Score; score->set_music (music); diff --git a/lily/text-interface.cc b/lily/text-interface.cc index 86a1381bb4..55e7bb7ec4 100644 --- a/lily/text-interface.cc +++ b/lily/text-interface.cc @@ -26,7 +26,7 @@ Text_interface::interpret_string (SCM layout_smob, SCM markup) { LY_ASSERT_SMOB (Output_def, layout_smob, 1); - LY_ASSERT_TYPE (scm_is_string, props, 3); + LY_ASSERT_TYPE (scm_is_string, markup, 3); string str = ly_scm2string (markup); Output_def *layout = unsmob_output_def (layout_smob); -- 2.39.5