patch: inlining

From: Jordi Mas <jmas_at_softcatala.org>
Date: Thu Dec 30 2004 - 13:09:42 CET

Hello,

I have been using a profiler with Abiword. I think that make sense to inline
the following functions. Are you guys OK with this?

Thanks,

-- 
Jordi Mas i Hernāndez
Homepage and LiveJournal at http://www.softcatala.org/~jmas

? diff.txt
? win/vc60.pdb
? win/vc70.pdb
? xp/vc60.pdb
? xp/vc70.pdb
Index: win/gr_Win32USPGraphics.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/gr/win/gr_Win32USPGraphics.cpp,v
retrieving revision 1.57
diff -u -r1.57 gr_Win32USPGraphics.cpp
--- win/gr_Win32USPGraphics.cpp 28 Dec 2004 10:09:42 -0000 1.57
+++ win/gr_Win32USPGraphics.cpp 30 Dec 2004 12:08:16 -0000
@@ -112,9 +112,9 @@
   public:
         virtual ~GR_Win32USPItem(){};
         
- virtual GR_ScriptType getType() const {return (GR_ScriptType) m_si.a.eScript;}
- virtual GR_Item * makeCopy() const {return new GR_Win32USPItem(m_si);} // make a copy of this item
- virtual GRRI_Type getClassId() const {return GRRI_WIN32_UNISCRIBE;}
+ inline virtual GR_ScriptType getType() const {return (GR_ScriptType) m_si.a.eScript;}
+ inline virtual GR_Item * makeCopy() const {return new GR_Win32USPItem(m_si);} // make a copy of this item
+ inline virtual GRRI_Type getClassId() const {return GRRI_WIN32_UNISCRIBE;}
 
         bool isRTL() const {return m_si.a.fRTL != 0;}
         
Index: xp/gr_Graphics.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/gr/xp/gr_Graphics.cpp,v
retrieving revision 1.143
diff -u -r1.143 gr_Graphics.cpp
--- xp/gr_Graphics.cpp 22 Dec 2004 21:44:14 -0000 1.143
+++ xp/gr_Graphics.cpp 30 Dec 2004 12:08:19 -0000
@@ -358,10 +358,6 @@
         m_iFontAllocNo = 0xffffffff;
 }
 
-UT_uint32 GR_Graphics::getZoomPercentage(void) const
-{
- return m_iZoomPercentage;
-}
 
 const char * GR_Graphics::invertDimension(UT_Dimension dim, double dValue) const
 {
Index: xp/gr_Graphics.h
===================================================================
RCS file: /cvsroot/abi/src/af/gr/xp/gr_Graphics.h,v
retrieving revision 1.139
diff -u -r1.139 gr_Graphics.h
--- xp/gr_Graphics.h 25 Oct 2004 20:18:03 -0000 1.139
+++ xp/gr_Graphics.h 30 Dec 2004 12:08:21 -0000
@@ -492,7 +492,7 @@
         virtual GR_Graphics::Cursor getCursor(void) const = 0;
 
         virtual void setZoomPercentage(UT_uint32 iZoom);
- UT_uint32 getZoomPercentage(void) const;
+ inline UT_uint32 getZoomPercentage(void) const {return m_iZoomPercentage; }
         static UT_uint32 getResolution(void) { return UT_LAYOUT_RESOLUTION; }
         inline void setPortrait (bool b) {m_bIsPortrait = b;}
         inline bool isPortrait (void) const {return m_bIsPortrait;}
Received on Thu Dec 30 13:10:37 2004

This archive was generated by hypermail 2.1.8 : Thu Dec 30 2004 - 13:10:37 CET