]> Cypherpunks repositories - gostls13.git/commitdiff
image: use Rectangle{} instead of ZR
authortomocy <tomocy.dev@gmail.com>
Thu, 29 Aug 2024 12:47:40 +0000 (12:47 +0000)
committerGopher Robot <gobot@golang.org>
Sun, 1 Sep 2024 15:47:54 +0000 (15:47 +0000)
ZR is deprecated,
so replace it with the literal Rectangle to represent the zero value.

Change-Id: I68c0ffec808eaed1e8c352bf364d295c0041594e
GitHub-Last-Rev: 850472888d3d0f5e68feb9ec09f0b544fe1f9446
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>
src/image/geom.go

index 7731b6bad8c43be2de176a5ee3f8929819fcc193..4ee14bff980cf0fde464731f0fb9041215a42631 100644 (file)
@@ -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 r.Empty() {
-               return ZR
+               return Rectangle{}
        }
        return r
 }