lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fix handling of grace notes to shorten preceding tied notes correctl


From: Benkő Pál
Subject: Re: fix handling of grace notes to shorten preceding tied notes correctly (issue 7108043)
Date: Tue, 15 Jan 2013 10:00:54 +0100

2013/1/15  <address@hidden>:
> https://codereview.appspot.com/7108043/diff/1/lily/include/audio-item.hh#newcode90
> lily/include/audio-item.hh:90: virtual string to_string () const;
> It seems fine to have the debug-output helper to_string(), but why make
> it a virtual member function?  Unless the compiler is a lot smarter than
> me, that would seem to require a pointer to the actual function be
> stored in every Audio_note object.  Then every user would need extra
> memory for every note, but would get no benefit.

no, pointer to the actual function is stored in a per-type (not
per-object) table,
the object stores a single pointer to the per-type function table,
and that pointer is needed anyway for a type with virtual members.
(btw I thought without checking that to_string is inherited from a
(very low level) base and now I can't easily check whether it's
really so - is it?)

p



reply via email to

[Prev in Thread] Current Thread [Next in Thread]