mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-14 23:17:27 +01:00
Revert "vector: expose (*Path).Reset"
This reverts commit 62978ea270
.
Reason: wrong function was exposed
Updates #3123
This commit is contained in:
parent
62978ea270
commit
adacd71167
@ -65,9 +65,9 @@ type subpath struct {
|
|||||||
closed bool
|
closed bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset resets the subpath.
|
// reset resets the subpath.
|
||||||
// Reset doesn't release the allocated memory so that the memory can be reused.
|
// reset doesn't release the allocated memory so that the memory can be reused.
|
||||||
func (s *subpath) Reset() {
|
func (s *subpath) reset() {
|
||||||
s.points = s.points[:0]
|
s.points = s.points[:0]
|
||||||
s.closed = false
|
s.closed = false
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ func (p *Path) appendNewSubpath(pt point) {
|
|||||||
if cap(p.subpaths) > len(p.subpaths) {
|
if cap(p.subpaths) > len(p.subpaths) {
|
||||||
// Reuse the last subpath since the last subpath might have an already allocated slice.
|
// Reuse the last subpath since the last subpath might have an already allocated slice.
|
||||||
p.subpaths = p.subpaths[:len(p.subpaths)+1]
|
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)
|
p.subpaths[len(p.subpaths)-1].appendPoint(pt)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user