]> git.lyx.org Git - features.git/commitdiff
remove some compiler warnings
authorAngus Leeming <leeming@lyx.org>
Mon, 24 Mar 2003 17:46:49 +0000 (17:46 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 24 Mar 2003 17:46:49 +0000 (17:46 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6569 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/xforms_resize.C

index 645c3a0bbfee396cac855a95a3f05411a1be243f..0e7b57f16e7646649a1087c74b4d9d0a490d8b7e 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-24  Angus Leeming  <leeming@lyx.org>
+
+       * xforms_resize.C (get_scaling_factor): "cure" float -> int warnings.
+
 2003-03-22  John Levon  <levon@movementarian.org>
 
        * xscreen.C: remove "internal", unused
index 38f514d358c75eeeef03fa265c7d84b661b4469d..39bfccc408bb729ee961c3c1e875bf3bd91e3c41 100644 (file)
@@ -50,7 +50,7 @@ double get_scaling_factor(FL_FORM * form)
 
            if (ob->objclass == FL_BUTTON &&
                (ob->type == FL_RETURN_BUTTON || ob->type == FL_MENU_BUTTON))
-               sw += FL_min(0.6f * ob->h, 0.6f * ob->w) - 1;
+               sw += (int)FL_min(0.6f * ob->h, 0.6f * ob->w) - 1;
 
            if (ob->objclass == FL_BUTTON && ob->type == FL_LIGHTBUTTON)
                sw += FL_LIGHTBUTTON_MINSIZE + 1;
@@ -58,11 +58,11 @@ double get_scaling_factor(FL_FORM * form)
            if (sw <= (ob->w - 2 * (bw + xm)) && sh <= (ob->h - 2 * (bw + ym)))
                continue;
 
-           if ((osize = ob->w - 2 * (bw + xm)) <= 0)
+           if ((osize = ob->w - 2 * (int)(bw + xm)) <= 0)
                osize = 1;
            xfactor = (float) sw / (float)osize;
 
-           if ((osize = ob->h - 2 * (bw + ym)) <= 0)
+           if ((osize = ob->h - 2 * (int)(bw + ym)) <= 0)
                osize = 1;
            yfactor = (float) sh / osize;