]> git.lyx.org Git - features.git/commitdiff
optimization after profiling
authorLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 4 Apr 2001 20:20:42 +0000 (20:20 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 4 Apr 2001 20:20:42 +0000 (20:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1885 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/lyxfont.C
src/lyxfont.h
src/lyxrow.C
src/lyxrow.h

index 2cc0328a3ac3a5ad59e5f8cc11402deabd19a6f4..a5ad3f5c3f9e9acc79df5180ad960979178ec586 100644 (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
index 19b5774ca06e9a58afd3c6a81948be3c6f800201..31beb27025d03760b5f6fced5f9e93390acd3a57 100644 (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;
index 2309eab91789510d4db67e401837c14ccbb791d9..07a0348d80e4ac14af04e85d8a1c6b3d557fe572 100644 (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);
 
index 539253a3a6a40a7db2abd5a7ed9690f2bfbabe1c..4a90389d9b4c66d517a85ab9811eb8712671409c 100644 (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;
index 108f925f415faada6a2162effbf4e58750594220..876a61cc44c3f8d12264bc2684fb0d9cd02ae10f 100644 (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