This commit is contained in:
aozhiwei 2023-09-11 19:13:42 +08:00
parent a28a913a90
commit 2ce4c46c71

View File

@ -74,6 +74,16 @@ func (this *ListHead) Next() *ListHead {
return this.next
}
func (this *ListHead) Size() int32 {
num := int32(0)
this.ForEach_r(
func (data interface{}) bool {
num++
return true
})
return num
}
func (this *ListHead) ForEachFrom(from *ListHead,
cb ListHead_Foreach_Func) {
for pos := from; pos != this; pos = pos.next {