Update of /cvsroot/plib/plib/src/pui
In directory usw-pr-cvs1:/tmp/cvs-serv11086
Modified Files:
puFont.cxx
Log Message:
John F. Fay: Small (but significant) optimization in puFont::getStringHeight
Index: puFont.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/pui/puFont.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- puFont.cxx 2 Mar 2002 18:20:09 -0000 1.14
+++ puFont.cxx 4 Jun 2002 22:03:33 -0000 1.15
@@ -141,11 +141,7 @@
#endif // #ifdef _PU_USE_GLUT_FONTS
if ( fnt_font_handle != NULL )
- {
- float i = pointsize * 1.333f ;
-
- return (int) ( ( i * count_lines ( s ) ) - ( 0.333f * pointsize ) ) ;
- }
+ return int ( pointsize * ( 1.333f * count_lines ( s ) - 0.333f ) ) ;
return 0 ;
}
|