mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
move to getter setter file
This commit is contained in:
parent
0c360eb6b2
commit
01661ec6a7
|
@ -9,13 +9,6 @@ import (
|
|||
*/
|
||||
type BpMap BpTree
|
||||
|
||||
func (self *BpMap) getRoot() *BpNode {
|
||||
return self.root
|
||||
}
|
||||
func (self *BpMap) setRoot(root *BpNode) {
|
||||
self.root = root
|
||||
}
|
||||
|
||||
func NewBpMap(node_size int) *BpMap {
|
||||
return &BpMap{
|
||||
root: NewLeaf(node_size),
|
||||
|
|
|
@ -10,13 +10,6 @@ type BpTree struct {
|
|||
root *BpNode
|
||||
}
|
||||
|
||||
func (self *BpTree) getRoot() *BpNode {
|
||||
return self.root
|
||||
}
|
||||
func (self *BpTree) setRoot(root *BpNode) {
|
||||
self.root = root
|
||||
}
|
||||
|
||||
type loc_iterator func() (i int, leaf *BpNode, li loc_iterator)
|
||||
|
||||
func NewBpTree(node_size int) *BpTree {
|
||||
|
|
15
weed/util/bptree/getter_setter.go
Normal file
15
weed/util/bptree/getter_setter.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package bptree
|
||||
|
||||
func (self *BpMap) getRoot() *BpNode {
|
||||
return self.root
|
||||
}
|
||||
func (self *BpMap) setRoot(root *BpNode) {
|
||||
self.root = root
|
||||
}
|
||||
|
||||
func (self *BpTree) getRoot() *BpNode {
|
||||
return self.root
|
||||
}
|
||||
func (self *BpTree) setRoot(root *BpNode) {
|
||||
self.root = root
|
||||
}
|
Loading…
Reference in a new issue