From 79cad7771ab9d313ec8ff6ae8c92d8ef1a20b13a Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 16 Jan 2013 20:23:30 +0000 Subject: [PATCH] Fix for Rectangle::constrainedWithin() --- modules/juce_graphics/geometry/juce_Rectangle.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_graphics/geometry/juce_Rectangle.h b/modules/juce_graphics/geometry/juce_Rectangle.h index 1b9bcdf5b7..41170b8ce4 100644 --- a/modules/juce_graphics/geometry/juce_Rectangle.h +++ b/modules/juce_graphics/geometry/juce_Rectangle.h @@ -612,8 +612,8 @@ public: */ Rectangle constrainedWithin (const Rectangle& areaToFitWithin) const noexcept { - const int newW = jmin (w, areaToFitWithin.getWidth()); - const int newH = jmin (h, areaToFitWithin.getHeight()); + const ValueType newW (jmin (w, areaToFitWithin.getWidth())); + const ValueType newH (jmin (h, areaToFitWithin.getHeight())); return Rectangle (jlimit (areaToFitWithin.getX(), areaToFitWithin.getRight() - newW, pos.x), jlimit (areaToFitWithin.getY(), areaToFitWithin.getBottom() - newH, pos.y),