From 04fb7960bdf6566438972ae2e280e954d6c09ca6 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Tue, 12 Jul 2011 17:02:55 +1000 Subject: image: remove superfluous if condition. DrawMask already returns early if r.Empty(). R=r CC=golang-dev http://codereview.appspot.com/4703041 --- src/pkg/image/draw/draw.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/pkg') diff --git a/src/pkg/image/draw/draw.go b/src/pkg/image/draw/draw.go index 1583e6b88..a748ff8c7 100644 --- a/src/pkg/image/draw/draw.go +++ b/src/pkg/image/draw/draw.go @@ -193,9 +193,6 @@ func drawFillOver(dst *image.RGBA, r image.Rectangle, src *image.ColorImage) { } func drawFillSrc(dst *image.RGBA, r image.Rectangle, src *image.ColorImage) { - if r.Dy() < 1 { - return - } sr, sg, sb, sa := src.RGBA() // The built-in copy function is faster than a straightforward for loop to fill the destination with // the color, but copy requires a slice source. We therefore use a for loop to fill the first row, and -- cgit v1.2.1