summaryrefslogtreecommitdiff
path: root/src/pkg/image
diff options
context:
space:
mode:
authorNigel Tao <nigeltao@golang.org>2009-11-13 17:40:20 -0800
committerNigel Tao <nigeltao@golang.org>2009-11-13 17:40:20 -0800
commite8f4cfe27111abf6b3d28b7f16fdce903d89cbb0 (patch)
tree69c2f6b792ce00179ea6d3e8b19242d48620f2b0 /src/pkg/image
parentfdb2b6f44b62a08e611679315fb2672750277c0f (diff)
downloadgolang-e8f4cfe27111abf6b3d28b7f16fdce903d89cbb0.tar.gz
Remove unnecessary int(h) casts in image.go.
R=rsc http://codereview.appspot.com/154125 Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/pkg/image')
-rw-r--r--src/pkg/image/image.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/image/image.go b/src/pkg/image/image.go
index c83258d2c..9fc753b0f 100644
--- a/src/pkg/image/image.go
+++ b/src/pkg/image/image.go
@@ -39,7 +39,7 @@ func (p *RGBA) Set(x, y int, c Color) { p.Pixel[y][x] = toRGBAColor(c).(RGBAColo
// NewRGBA returns a new RGBA with the given width and height.
func NewRGBA(w, h int) *RGBA {
pixel := make([][]RGBAColor, h);
- for y := 0; y < int(h); y++ {
+ for y := 0; y < h; y++ {
pixel[y] = make([]RGBAColor, w)
}
return &RGBA{pixel};
@@ -69,7 +69,7 @@ func (p *RGBA64) Set(x, y int, c Color) { p.Pixel[y][x] = toRGBA64Color(c).(RGBA
// NewRGBA64 returns a new RGBA64 with the given width and height.
func NewRGBA64(w, h int) *RGBA64 {
pixel := make([][]RGBA64Color, h);
- for y := 0; y < int(h); y++ {
+ for y := 0; y < h; y++ {
pixel[y] = make([]RGBA64Color, w)
}
return &RGBA64{pixel};
@@ -99,7 +99,7 @@ func (p *NRGBA) Set(x, y int, c Color) { p.Pixel[y][x] = toNRGBAColor(c).(NRGBAC
// NewNRGBA returns a new NRGBA with the given width and height.
func NewNRGBA(w, h int) *NRGBA {
pixel := make([][]NRGBAColor, h);
- for y := 0; y < int(h); y++ {
+ for y := 0; y < h; y++ {
pixel[y] = make([]NRGBAColor, w)
}
return &NRGBA{pixel};
@@ -129,7 +129,7 @@ func (p *NRGBA64) Set(x, y int, c Color) { p.Pixel[y][x] = toNRGBA64Color(c).(NR
// NewNRGBA64 returns a new NRGBA64 with the given width and height.
func NewNRGBA64(w, h int) *NRGBA64 {
pixel := make([][]NRGBA64Color, h);
- for y := 0; y < int(h); y++ {
+ for y := 0; y < h; y++ {
pixel[y] = make([]NRGBA64Color, w)
}
return &NRGBA64{pixel};
@@ -206,7 +206,7 @@ func (p *Paletted) SetColorIndex(x, y int, index uint8) {
// NewPaletted returns a new Paletted with the given width, height and palette.
func NewPaletted(w, h int, m PalettedColorModel) *Paletted {
pixel := make([][]uint8, h);
- for y := 0; y < int(h); y++ {
+ for y := 0; y < h; y++ {
pixel[y] = make([]uint8, w)
}
return &Paletted{pixel, m};