Commit c0074933 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent edfb66a5
...@@ -35,13 +35,13 @@ type RangedMap struct { ...@@ -35,13 +35,13 @@ type RangedMap struct {
// TODO rework to use BTree lo->hi_ instead if in practice in treediff, // 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 // and other usage places, N(ranges) turns out to be not small
// (i.e. performance turns out to be not acceptable) // (i.e. performance turns out to be not acceptable)
entryv []mapEntry // lo entryv []RangeMapEntry // lo
} }
// mapEntry represents one entry in RangedMap. // RangeMapEntry represents one entry in RangedMap.
type mapEntry struct { type RangeMapEntry struct {
KeyRange KeyRange
value VALUE Value VALUE
} }
// Set changes M to map key k to value v. // Set changes M to map key k to value v.
...@@ -346,11 +346,11 @@ func (M *RangedMap) Clear() { ...@@ -346,11 +346,11 @@ func (M *RangedMap) Clear() {
M.entryv = nil 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? // TODO -> iter?
func (S *RangedKeySet) AllRanges() /*readonly*/[]KeyRange { func (M *RangedKeySet) AllEntries() /*readonly*/[]RangeMapEntry {
return S.rangev return M.entryv
} }
// XXX -> ptr? // 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