Is there a reason for all these inline member functions to LyXFont or is this 
just old, old code?

Specifically,
LyXFont::shape, emph were moved inline by Lars on 4 Apr, 2001 (lyxfont.h 
revision 1.33).
LyXFont::LyXFont, family, series, size, emph, noun were moved inline by Lars 
on 17 Apr, 2001 (lyxfont.h revision 1.35).

I'd guess that if there was a reason then, then there is a reason now.

Interestingly, the accessors for LColor::color LyXFont::FontBits::color are 
_not_ inline. 

If a pimpl-ing of LyXFont would have unacceptable performance implications, we 
could nonetheless get that #include "LColor.h" out of the lyxfont.h header 
file by storing 'color' as an int. Ie

class LyXFont {
        class FontBits {
                int color;
        };
};

and rewriting the accessors (in lyxfont.C) as:

EnumLColor LyXFont::color() const
{
        return static_cast<LColor::color>(bits.color);
}

LyXFont & LyXFont::setColor(EnumLColor c)
{
        bits.color = int(c);
        return *this;
}

Is such a strategy acceptable?

-- 
Angus

Reply via email to