From 40e9ae6e6107a79eed12ed2e8efedb6e4e8597f1 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 29 Jan 2016 20:50:04 +0000 Subject: Fixed a few warnings from a picky compiler setting. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11086 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_win32.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Fl_win32.cxx') diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index c96c5335a..10e8141da 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -787,9 +787,9 @@ void Fl::paste(Fl_Widget &receiver, int clipboard, const char *type) { int vmm = GetDeviceCaps(hdc, VERTSIZE); int vdots = GetDeviceCaps(hdc, VERTRES); ReleaseDC(NULL, hdc); - float factorw = (100. * hmm) / hdots; - float factorh = (100. * vmm) / vdots + 0.5; - width /= factorw; height /= factorh; // convert to screen pixel unit + float factorw = (100.f * hmm) / hdots; + float factorh = (100.f * vmm) / vdots + 0.5f; + width = (int)(width/factorw); height = (int)(height/factorh); // convert to screen pixel unit RECT rect = {0, 0, width, height}; Fl_Offscreen off = fl_create_offscreen(width, height); fl_begin_offscreen(off); -- cgit v1.2.3