On Mon, Jul 30, 2012 at 10:14:37PM +0100, Phil Holmes wrote:
> ----- Original Message ----- From: <gra...@percival-music.ca>
>> lily/output-def.cc:38: Real long_name_len = 0.0;
>> could these be class member variables instead of global variables?
>
> I don't believe so.  I'd be happy to be corrected by someone who 
> understands this better than I do, but my understanding of c++ (which I 
> guess at based on c#) says that, in order to access a class member 
> variable, you need to have an instantiation of the class. 

In C++ variables can be declared static. If this is done all instances of
the class share the same instance of the variable and it can exist
even if the class has no instances see:

http://www.learncpp.com/cpp-tutorial/811-static-member-variables/

Bernard

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to