From: Nigel Tao Date: Tue, 12 Jul 2011 07:02:55 +0000 (+1000) Subject: image: remove superfluous if condition. X-Git-Tag: weekly.2011-07-19~111 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=851ded9660d0fbf688a9db2472e82c6fea72bb2f;p=gostls13.git image: remove superfluous if condition. DrawMask already returns early if r.Empty(). R=r CC=golang-dev https://golang.org/cl/4703041 --- diff --git a/src/pkg/image/draw/draw.go b/src/pkg/image/draw/draw.go index 1583e6b888..a748ff8c77 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