From: Constantin Kaplinsky Date: Fri, 8 Sep 2006 13:52:23 +0000 (+0000) Subject: Eliminated some compilation warnings. X-Git-Tag: v0.0.90~384^2~231 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=660fa1810ebfc0c89bd5eea5ee1a3289c8bf24a5;p=tigervnc.git Eliminated some compilation warnings. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@652 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/common/rfb/ScaledPixelBuffer.cxx b/common/rfb/ScaledPixelBuffer.cxx index 568b26bd..bc59fb5e 100644 --- a/common/rfb/ScaledPixelBuffer.cxx +++ b/common/rfb/ScaledPixelBuffer.cxx @@ -119,11 +119,11 @@ void ScaledPixelBuffer::scaleRect(const Rect& r) { Rect ScaledPixelBuffer::calculateScaleBoundary(const Rect& r) { static int x_start, y_start, x_end, y_end; - x_start = r.tl.x == 0 ? 0 : ceil((r.tl.x-1) * scale_ratio); - y_start = r.tl.y == 0 ? 0 : ceil((r.tl.y-1) * scale_ratio); - x_end = ceil(r.br.x * scale_ratio - 1); + x_start = r.tl.x == 0 ? 0 : int(ceil((r.tl.x-1) * scale_ratio)); + y_start = r.tl.y == 0 ? 0 : int(ceil((r.tl.y-1) * scale_ratio)); + x_end = int(ceil(r.br.x * scale_ratio - 1)); x_end = x_end < scaled_width ? x_end + 1 : scaled_width; - y_end = ceil(r.br.y * scale_ratio - 1); + y_end = int(ceil(r.br.y * scale_ratio - 1)); y_end = y_end < scaled_height ? y_end + 1 : scaled_height; return Rect(x_start, y_start, x_end, y_end); }