Updated orderednavigablemap

This commit is contained in:
Trial97
2021-10-25 10:48:29 +03:00
committed by Dan Christian Bogos
parent a541e45313
commit 69fb71d2cf
2 changed files with 42 additions and 0 deletions

View File

@@ -67,6 +67,11 @@ func (onm *OrderedNavigableMap) Empty() bool {
func (onm *OrderedNavigableMap) removeRef(path string) {
for idxPath, slcIdx := range onm.orderRef { //remove the references from order
if strings.HasPrefix(idxPath, path) {
if lp := len(path); len(idxPath) > lp &&
idxPath[lp] != NestingSep[0] &&
idxPath[lp] != IdxStart[0] {
continue
}
for _, el := range slcIdx {
onm.orderIdx.Remove(el)
}