Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LARN
PRRT
Commits
5d728194
Commit
5d728194
authored
Dec 06, 2017
by
Andreas Schmidt
Browse files
Undo BPTree simplification.
parent
460ad13d
Pipeline
#1682
passed with stages
in 1 minute and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
prrt/util/bptree.c
View file @
5d728194
...
...
@@ -1062,7 +1062,14 @@ void *BPTree_get_first_in_range(BPTreeNode *root, BPTreeKey_t key_start, BPTreeK
if
(
n
==
NULL
)
return
NULL
;
for
(
i
=
0
;
i
<
n
->
num_keys
&&
n
->
keys
[
i
]
<
key_start
;
i
++
);
if
(
i
==
n
->
num_keys
)
return
NULL
;
return
((
BPTreeRecord
*
)
n
->
pointers
[
i
])
->
value
;
while
(
n
!=
NULL
)
{
for
(;
i
<
n
->
num_keys
&&
n
->
keys
[
i
]
<=
key_end
;
i
++
)
{
return
((
BPTreeRecord
*
)
n
->
pointers
[
i
])
->
value
;
}
n
=
n
->
pointers
[
order
-
1
];
i
=
0
;
}
return
NULL
;
}
uint32_t
BPTree_size
(
BPTreeNode
*
root
)
{
...
...
Write
Preview
Supports
Markdown
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