Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dgraph
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
dgraph
Commits
61192f7d
Unverified
Commit
61192f7d
authored
8 years ago
by
Manish R Jain
Browse files
Options
Downloads
Patches
Plain Diff
Move l.isEnd() checking to within whence.
parent
da07c346
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
algo/uidlist.go
+3
-3
3 additions, 3 deletions
algo/uidlist.go
with
3 additions
and
3 deletions
algo/uidlist.go
+
3
−
3
View file @
61192f7d
...
...
@@ -123,10 +123,10 @@ func (l *ListIterator) SeekToIndex(idx int) {
// Seek seeks to the index whose value is greater than or equal to the given UID.
// It uses binary search to move around.
func
(
l
*
ListIterator
)
Seek
(
uid
uint64
,
whence
int
)
{
if
l
.
isEnd
{
return
}
if
whence
==
1
{
if
l
.
isEnd
{
return
}
// Seek the current list first.
for
l
.
lidx
<
len
(
l
.
curBlock
.
List
)
&&
l
.
curBlock
.
List
[
l
.
lidx
]
<
uid
{
l
.
lidx
++
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment