Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
43e6af88
Commit
43e6af88
authored
May 15, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
17bd832f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
wcfs/pptreesubset.go
wcfs/pptreesubset.go
+17
-4
No files found.
wcfs/pptreesubset.go
View file @
43e6af88
...
...
@@ -123,11 +123,24 @@ func (S PPTreeSubSet) AddPath(path []zodb.Oid) {
}
// AddNodePath is a convenience wrapper to call AddPath starting from Nodes instead of Oids.
func
(
S
PPTreeSubSet
)
AddNodePath
(
path
[]
Node
)
{
// XXX Tree|Bucket; path[0] = root
// XXX assert Tree Tree ... Tree Bucket
// root := path[0].(*Tree).POid()
func
(
S
PPTreeSubSet
)
AddNodePath
(
path
[]
Node
)
{
// assert path = Tree Tree ... Tree Bucket
l
:=
len
(
path
)
switch
{
case
l
==
0
:
panic
(
"empty path"
)
case
l
==
1
:
// must be empty Tree
_
=
path
[
0
]
.
(
*
Tree
)
default
:
// must be Tree Tree ... Tree Bucket
for
_
,
node
:=
range
path
[
:
l
-
1
]
{
_
=
node
.
(
*
Tree
)
}
_
=
path
[
l
-
1
]
.
(
*
Bucket
)
}
oidv
:=
make
([]
zodb
.
Oid
,
l
en
(
path
)
)
oidv
:=
make
([]
zodb
.
Oid
,
l
)
for
i
,
node
:=
range
path
{
oidv
[
i
]
=
node
.
POid
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment