mirror of
https://github.com/golang/go
synced 2024-11-24 17:50:15 -07:00
image: use Rectangle{} instead of ZR
ZR is deprecated,
so replace it with the literal Rectangle to represent the zero value.
Change-Id: I68c0ffec808eaed1e8c352bf364d295c0041594e
GitHub-Last-Rev: 850472888d
GitHub-Pull-Request: golang/go#69136
Reviewed-on: https://go-review.googlesource.com/c/go/+/609516
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Reviewed-by: Nigel Tao <nigeltao@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
parent
239666cd73
commit
fc9f02c7ae
@ -169,7 +169,7 @@ func (r Rectangle) Intersect(s Rectangle) Rectangle {
|
|||||||
//
|
//
|
||||||
// if max(r0.Min.X, s0.Min.X) >= min(r0.Max.X, s0.Max.X) || likewiseForY { etc }
|
// if max(r0.Min.X, s0.Min.X) >= min(r0.Max.X, s0.Max.X) || likewiseForY { etc }
|
||||||
if r.Empty() {
|
if r.Empty() {
|
||||||
return ZR
|
return Rectangle{}
|
||||||
}
|
}
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user