From: Angus Leeming Date: Mon, 24 Mar 2003 17:46:49 +0000 (+0000) Subject: remove some compiler warnings X-Git-Tag: 1.6.10~17180 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=93543287ced2db44e2cfa0a7ac0d5e24757ce97e;p=features.git remove some compiler warnings git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6569 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 645c3a0bbf..0e7b57f16e 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2003-03-24 Angus Leeming + + * xforms_resize.C (get_scaling_factor): "cure" float -> int warnings. + 2003-03-22 John Levon * xscreen.C: remove "internal", unused diff --git a/src/frontends/xforms/xforms_resize.C b/src/frontends/xforms/xforms_resize.C index 38f514d358..39bfccc408 100644 --- a/src/frontends/xforms/xforms_resize.C +++ b/src/frontends/xforms/xforms_resize.C @@ -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;