mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-01-10 17:00:18 +01:00
unexport span methods
This commit is contained in:
parent
88e9088704
commit
1df81c3e1d
@ -37,7 +37,7 @@ func (c3d *Coverage3D) Insert(c Coord) {
|
||||
defer c3d.mu.Unlock()
|
||||
zr := c3d.zRanges[c.Z]
|
||||
if zr == nil {
|
||||
xr := c3d.pool.Alloc()
|
||||
xr := c3d.pool.alloc()
|
||||
xr.From = int32(c.X)
|
||||
xr.To = int32(c.X)
|
||||
xr.Next = nil
|
||||
|
@ -26,7 +26,7 @@ func newSpanPool() *spanPool {
|
||||
return &spanPool{}
|
||||
}
|
||||
|
||||
func (sp *spanPool) Alloc() *span {
|
||||
func (sp *spanPool) alloc() *span {
|
||||
if sp.freeList != nil {
|
||||
next := sp.freeList
|
||||
sp.freeList = next.Next
|
||||
@ -66,7 +66,7 @@ func (sp *spanPool) insert(s *span, pos, value int32) *span {
|
||||
|
||||
// No head -> create.
|
||||
if s == nil {
|
||||
s = sp.Alloc()
|
||||
s = sp.alloc()
|
||||
s.From = pos
|
||||
s.To = pos
|
||||
s.Value = value
|
||||
@ -81,7 +81,7 @@ func (sp *spanPool) insert(s *span, pos, value int32) *span {
|
||||
return s
|
||||
}
|
||||
// Disjunct -> create new head.
|
||||
prev := sp.Alloc()
|
||||
prev := sp.alloc()
|
||||
prev.From = pos
|
||||
prev.To = pos
|
||||
prev.Value = value
|
||||
@ -109,7 +109,7 @@ func (sp *spanPool) insert(s *span, pos, value int32) *span {
|
||||
}
|
||||
// Before next -> New between current and next
|
||||
if next == nil || pos < next.From {
|
||||
sn := sp.Alloc()
|
||||
sn := sp.alloc()
|
||||
sn.From = pos
|
||||
sn.To = pos
|
||||
sn.Value = value
|
||||
|
Loading…
Reference in New Issue
Block a user