Commit c0074933 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent edfb66a5
......@@ -35,13 +35,13 @@ type RangedMap struct {
// TODO rework to use BTree lo->hi_ instead if in practice in treediff,
// and other usage places, N(ranges) turns out to be not small
// (i.e. performance turns out to be not acceptable)
entryv []mapEntry // lo
entryv []RangeMapEntry // lo
}
// mapEntry represents one entry in RangedMap.
type mapEntry struct {
// RangeMapEntry represents one entry in RangedMap.
type RangeMapEntry struct {
KeyRange
value VALUE
Value VALUE
}
// Set changes M to map key k to value v.
......@@ -346,11 +346,11 @@ func (M *RangedMap) Clear() {
M.entryv = nil
}
// AllRanges returns slice of all key ranges in the set.
// AllEntries returns slice of all key ranges in the set.
//
// TODO -> iter?
func (S *RangedKeySet) AllRanges() /*readonly*/[]KeyRange {
return S.rangev
func (M *RangedKeySet) AllEntries() /*readonly*/[]RangeMapEntry {
return M.entryv
}
// XXX -> ptr?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment