diff options
author | Rob Pike <r@golang.org> | 2013-07-23 11:59:49 +1000 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2013-07-23 11:59:49 +1000 |
commit | c13c56605db83bd775736616f9e19837b93ede97 (patch) | |
tree | 566fc71200824838df66c0dc4203e42e2c2901de /src/pkg/image/image.go | |
parent | e8ee29cd4005834559698014a75e0692cbce351f (diff) | |
download | go-c13c56605db83bd775736616f9e19837b93ede97.tar.gz |
all: be more idiomatic when documenting boolean return values.
Phrases like "returns whether or not the image is opaque" could be
describing what the function does (it always returns, regardless of
the opacity) or what it returns (a boolean indicating the opacity).
Even when the "or not" is missing, the phrasing is bizarre.
Go with "reports whether", which is still clunky but at least makes
it clear we're talking about the return value.
These were edited by hand. A few were cleaned up in other ways.
R=golang-dev, dsymonds
CC=golang-dev
https://codereview.appspot.com/11699043
Diffstat (limited to 'src/pkg/image/image.go')
-rw-r--r-- | src/pkg/image/image.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/pkg/image/image.go b/src/pkg/image/image.go index 03ac60606..32a89ef34 100644 --- a/src/pkg/image/image.go +++ b/src/pkg/image/image.go @@ -126,7 +126,7 @@ func (p *RGBA) SubImage(r Rectangle) Image { } } -// Opaque scans the entire image and returns whether or not it is fully opaque. +// Opaque scans the entire image and reports whether it is fully opaque. func (p *RGBA) Opaque() bool { if p.Rect.Empty() { return true @@ -234,7 +234,7 @@ func (p *RGBA64) SubImage(r Rectangle) Image { } } -// Opaque scans the entire image and returns whether or not it is fully opaque. +// Opaque scans the entire image and reports whether it is fully opaque. func (p *RGBA64) Opaque() bool { if p.Rect.Empty() { return true @@ -329,7 +329,7 @@ func (p *NRGBA) SubImage(r Rectangle) Image { } } -// Opaque scans the entire image and returns whether or not it is fully opaque. +// Opaque scans the entire image and reports whether it is fully opaque. func (p *NRGBA) Opaque() bool { if p.Rect.Empty() { return true @@ -437,7 +437,7 @@ func (p *NRGBA64) SubImage(r Rectangle) Image { } } -// Opaque scans the entire image and returns whether or not it is fully opaque. +// Opaque scans the entire image and reports whether it is fully opaque. func (p *NRGBA64) Opaque() bool { if p.Rect.Empty() { return true @@ -525,7 +525,7 @@ func (p *Alpha) SubImage(r Rectangle) Image { } } -// Opaque scans the entire image and returns whether or not it is fully opaque. +// Opaque scans the entire image and reports whether it is fully opaque. func (p *Alpha) Opaque() bool { if p.Rect.Empty() { return true @@ -616,7 +616,7 @@ func (p *Alpha16) SubImage(r Rectangle) Image { } } -// Opaque scans the entire image and returns whether or not it is fully opaque. +// Opaque scans the entire image and reports whether it is fully opaque. func (p *Alpha16) Opaque() bool { if p.Rect.Empty() { return true @@ -704,7 +704,7 @@ func (p *Gray) SubImage(r Rectangle) Image { } } -// Opaque scans the entire image and returns whether or not it is fully opaque. +// Opaque scans the entire image and reports whether it is fully opaque. func (p *Gray) Opaque() bool { return true } @@ -782,7 +782,7 @@ func (p *Gray16) SubImage(r Rectangle) Image { } } -// Opaque scans the entire image and returns whether or not it is fully opaque. +// Opaque scans the entire image and reports whether it is fully opaque. func (p *Gray16) Opaque() bool { return true } @@ -873,7 +873,7 @@ func (p *Paletted) SubImage(r Rectangle) Image { } } -// Opaque scans the entire image and returns whether or not it is fully opaque. +// Opaque scans the entire image and reports whether it is fully opaque. func (p *Paletted) Opaque() bool { var present [256]bool i0, i1 := 0, p.Rect.Dx() |