harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r694210 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/native/winfont/windows/winFont.cpp
Date Thu, 11 Sep 2008 10:42:48 GMT
Author: odeakin
Date: Thu Sep 11 03:42:47 2008
New Revision: 694210

URL: http://svn.apache.org/viewvc?rev=694210&view=rev
Log:
Fix errors from HARMONY-5976 ([classlib] Results of static analysis):
 - Use labs() instead of abs() so there is no loss of precision.
 - Fix "==" errors

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/winfont/windows/winFont.cpp

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/winfont/windows/winFont.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/winfont/windows/winFont.cpp?rev=694210&r1=694209&r2=694210&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/winfont/windows/winFont.cpp
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/winfont/windows/winFont.cpp
Thu Sep 11 03:42:47 2008
@@ -66,7 +66,7 @@
 
     DPtoLP(hDC, P, 2); // map device coordinate to logical size
 
-    return abs(P[1].y - P[0].y) / 72 / divisor;
+    return labs(P[1].y - P[0].y) / 72 / divisor;
 }
 
 /* Returns font style of the LOGFONT structure */
@@ -367,7 +367,7 @@
     
     res = enumFamilies();
 
-    if (res = FONTLIB_ERROR){
+    if (res == FONTLIB_ERROR){
         throwNPException(env, "Not enough memory to enumerate font family names list.");
         return NULL;
     }
@@ -405,7 +405,7 @@
     jobjectArray faces;
     res = enumFonts();
 
-    if (res = FONTLIB_ERROR){
+    if (res == FONTLIB_ERROR){
         throwNPException(env, "Not enough memory to enumerate font names list.");
         return;
     }



Mime
View raw message