>>>>> "Jose" == Jose Abilio Oliveira Matos <[EMAIL PROTECTED]> writes:
Jose> On Fri, Jul 23, 1999 at 07:02:16PM +0200, Jean-Marc Lasgouttes
Jose> wrote:
>> >>>>> "Jose" == Jose Abilio Oliveira Matos
>> <[EMAIL PROTECTED]> writes:
>>
Jose> If you find any suspicious C++ constrution, please tell me, I'm
Jose> still learning. And I really want to improve LyX code quality
Jose> (my code of course :-)
>> Let's see... The following enum would better be moved into the
>> Buffer class (in buffer.h):
>>
>> + enum {NO_ONE,FOOTNOTE_LIKE,MARGIN_LIKE,FIG_LIKE,TAB_LIKE}
>> last=NO_ONE,present=FOOTNOTE_LIKE;
Jose> I only need this enum in the function it is declared. I
Jose> wanted that the variables last and present had the same type, so
Jose> the comparison would only be possible between the same type.
Then in this case, I'd rather see in the function:
enum {NO_ONE,
FOOTNOTE_LIKE,
MARGIN_LIKE,
FIG_LIKE,
TAB_LIKE} PickYourName;
PickYourName last = NO_ONE;
PickYourName present = FOOTNOTE_LIKE;
Personally, I find it much more readable: not on one huge line, the
enum name gives a hint about what it does, ...
JMarc