X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmusic-constructor.cc;h=e86672d7c7db6b6eccafc1a5b2979443485c56a6;hb=829caefcc215ddffe25806d0ff87bcc577c3286e;hp=2615221615b801fe75b81e0a73b182ac64f721cd;hpb=9651bafcd832c72a8f81ade4b602199583d61f37;p=lilypond.git diff --git a/lily/music-constructor.cc b/lily/music-constructor.cc index 2615221615..e86672d7c7 100644 --- a/lily/music-constructor.cc +++ b/lily/music-constructor.cc @@ -3,12 +3,16 @@ source file of the GNU LilyPond music typesetter - (c) 2001 Han-Wen Nienhuys + (c) 2001--2004 Han-Wen Nienhuys */ #include // UGH. +#include + +#include "warn.hh" #include "music-constructor.hh" + typedef Music* (*Music_ctor) (); static std::map *ctors_map_; @@ -33,8 +37,13 @@ get_music_ctor (String s) } Music* -get_music (String s) +make_music (String s) { - return (*get_music_ctor (s)) (); + Music_ctor c = get_music_ctor (s); + if (!c) + programming_error (String ("No constructor for music: ") + s); + assert (c); + + return (*c) (); }