mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
tweaks some comments
This commit is contained in:
parent
34aac1d756
commit
a374efe4d4
1 changed files with 3 additions and 3 deletions
|
|
@ -15,7 +15,7 @@ import "cmp"
|
||||||
// The size of a block of data
|
// The size of a block of data
|
||||||
const blockSize = 4096
|
const blockSize = 4096
|
||||||
|
|
||||||
// A prioritized item in the sorted stack.
|
// item a prioritized item in the sorted stack.
|
||||||
type item[P cmp.Ordered, V any] struct {
|
type item[P cmp.Ordered, V any] struct {
|
||||||
value V
|
value V
|
||||||
priority P
|
priority P
|
||||||
|
|
@ -26,7 +26,7 @@ type item[P cmp.Ordered, V any] struct {
|
||||||
// to delete elements other than the top one.
|
// to delete elements other than the top one.
|
||||||
type SetIndexCallback[V any] func(data V, index int)
|
type SetIndexCallback[V any] func(data V, index int)
|
||||||
|
|
||||||
// Internal sortable stack data structure. Implements the Push and Pop ops for
|
// sstack internal sortable stack data structure. Implements the Push and Pop ops for
|
||||||
// the stack (heap) functionality and the Len, Less and Swap methods for the
|
// the stack (heap) functionality and the Len, Less and Swap methods for the
|
||||||
// sortability requirements of the heaps.
|
// sortability requirements of the heaps.
|
||||||
type sstack[P cmp.Ordered, V any] struct {
|
type sstack[P cmp.Ordered, V any] struct {
|
||||||
|
|
@ -39,7 +39,7 @@ type sstack[P cmp.Ordered, V any] struct {
|
||||||
active []*item[P, V]
|
active []*item[P, V]
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates a new, empty stack.
|
// newSstack creates a new, empty stack.
|
||||||
func newSstack[P cmp.Ordered, V any](setIndex SetIndexCallback[V]) *sstack[P, V] {
|
func newSstack[P cmp.Ordered, V any](setIndex SetIndexCallback[V]) *sstack[P, V] {
|
||||||
result := new(sstack[P, V])
|
result := new(sstack[P, V])
|
||||||
result.setIndex = setIndex
|
result.setIndex = setIndex
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue