There’s this repetition in context.cc:
if (origin)
{
origin->warning (_f ("cannot find or create `%s' called `%s'",
ly_symbol2string (n).c_str (), id));
}
else
{
warning (_f ("cannot find or create `%s' called `%s'",
ly_symbol2string (n).c_str (), id));
}
I put up with this when it was just one instance, but it’s starting to multiply
in my work in progress.
I see that ::warning already accepts a location string as an optional second
parameter, so I am thinking of using that rather than creating yet another
interface. I am thinking of defining a helper function message_location(const
Input*) to be used like this:
warning (_f (. . .), message_location (origin));
Are there any strong objections to this? If so, what would you prefer?
—
Dan
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel