optimization after profiling

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1885 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2001-04-04 20:20:42 +00:00
parent b76c5d218e
commit ff367a38b1
5 changed files with 73 additions and 64 deletions

View File

@ -1,3 +1,19 @@
2001-04-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
* lyxrow.C (par): moved
(height): moved
(next): moved
* lyxrox.h: as inlines here
* lyxfont.h (shape): moved from lyxfont.C
(emph): moved from lyxfont.C
* lyxfont.C (LyXFont): use initialization list for all
constructors
(shape): move to lyxfont.h as inline
(emph): move to lyxfont.h as inline
2001-04-04 Juergen Vigna <jug@sad.it>
* vspace.C: had to include stdio.h for use of sscanf

View File

@ -156,52 +156,38 @@ bool LyXFont::FontBits::operator!=(LyXFont::FontBits const & fb1) const
LyXFont::LyXFont()
{
bits = sane;
lang = default_language;
}
: bits(sane), lang(default_language)
{}
LyXFont::LyXFont(LyXFont::FONT_INIT1)
{
bits = inherit;
lang = default_language;
}
: bits(inherit), lang(default_language)
{}
LyXFont::LyXFont(LyXFont::FONT_INIT2)
{
bits = ignore;
lang = ignore_language;
}
: bits(ignore), lang(ignore_language)
{}
LyXFont::LyXFont(LyXFont::FONT_INIT3)
{
bits = sane;
lang = default_language;
}
: bits(sane), lang(default_language)
{}
LyXFont::LyXFont(LyXFont::FONT_INIT1, Language const * l)
{
bits = inherit;
lang = l;
}
: bits(inherit), lang(l)
{}
LyXFont::LyXFont(LyXFont::FONT_INIT2, Language const * l)
{
bits = ignore;
lang = l;
}
: bits(ignore), lang(l)
{}
LyXFont::LyXFont(LyXFont::FONT_INIT3, Language const * l)
{
bits = sane;
lang = l;
}
: bits(sane), lang(l)
{}
LyXFont::FONT_FAMILY LyXFont::family() const
@ -216,24 +202,12 @@ LyXFont::FONT_SERIES LyXFont::series() const
}
LyXFont::FONT_SHAPE LyXFont::shape() const
{
return bits.shape;
}
LyXFont::FONT_SIZE LyXFont::size() const
{
return bits.size;
}
LyXFont::FONT_MISC_STATE LyXFont::emph() const
{
return bits.emph;
}
LyXFont::FONT_MISC_STATE LyXFont::underbar() const
{
return bits.underbar;

View File

@ -368,6 +368,21 @@ private:
LyXFont::FONT_MISC_STATE org);
};
inline
LyXFont::FONT_SHAPE LyXFont::shape() const
{
return bits.shape;
}
inline
LyXFont::FONT_MISC_STATE LyXFont::emph() const
{
return bits.emph;
}
///
std::ostream & operator<<(std::ostream &, LyXFont::FONT_MISC_STATE);

View File

@ -29,18 +29,6 @@ void Row::par(LyXParagraph * p)
}
LyXParagraph * Row::par()
{
return par_;
}
LyXParagraph * Row::par() const
{
return par_;
}
void Row::pos(LyXParagraph::size_type p)
{
pos_ = p;
@ -71,12 +59,6 @@ void Row::height(unsigned short h)
}
unsigned short Row::height() const
{
return height_;
}
void Row::width(unsigned int w)
{
width_ = w;
@ -119,12 +101,6 @@ void Row::next(Row * r)
}
Row * Row::next() const
{
return next_;
}
void Row::previous(Row * r)
{
previous_ = r;

View File

@ -83,4 +83,32 @@ private:
Row * previous_;
};
inline
LyXParagraph * Row::par()
{
return par_;
}
inline
LyXParagraph * Row::par() const
{
return par_;
}
inline
unsigned short Row::height() const
{
return height_;
}
inline
Row * Row::next() const
{
return next_;
}
#endif