lilypond-devel
[Top][All Lists]
Advanced

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

Re: Set indent based on instrument name (issue 6457049)


From: Bernard Hurley
Subject: Re: Set indent based on instrument name (issue 6457049)
Date: Mon, 30 Jul 2012 23:44:28 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Jul 30, 2012 at 10:14:37PM +0100, Phil Holmes wrote:
> ----- Original Message ----- From: <address@hidden>
>> 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



reply via email to

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