From adacd71167519b9411018a4b232d1c9e54ca3f6c Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 6 Oct 2024 03:40:55 +0900 Subject: [PATCH] Revert "vector: expose (*Path).Reset" This reverts commit 62978ea27026f97fc298827589650753ed1c237d. Reason: wrong function was exposed Updates #3123 --- vector/path.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vector/path.go b/vector/path.go index f72f8308e..20dab7d68 100644 --- a/vector/path.go +++ b/vector/path.go @@ -65,9 +65,9 @@ type subpath struct { closed bool } -// Reset resets the subpath. -// Reset doesn't release the allocated memory so that the memory can be reused. -func (s *subpath) Reset() { +// reset resets the subpath. +// reset doesn't release the allocated memory so that the memory can be reused. +func (s *subpath) reset() { s.points = s.points[:0] s.closed = false } @@ -123,7 +123,7 @@ func (p *Path) appendNewSubpath(pt point) { if cap(p.subpaths) > len(p.subpaths) { // Reuse the last subpath since the last subpath might have an already allocated slice. p.subpaths = p.subpaths[:len(p.subpaths)+1] - p.subpaths[len(p.subpaths)-1].Reset() + p.subpaths[len(p.subpaths)-1].reset() p.subpaths[len(p.subpaths)-1].appendPoint(pt) return }