Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
4bdc3989
Commit
4bdc3989
authored
May 08, 2016
by
Dong-hee Na
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bitset begin() fix
parent
b163e6cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/core/util.h
src/core/util.h
+4
-3
No files found.
src/core/util.h
View file @
4bdc3989
...
...
@@ -181,9 +181,10 @@ template <int N> struct BitSet {
}
iterator
begin
()
const
{
uint16_t
tmp
=
bits
;
for
(
int
i
=
0
;
i
<
N
;
i
++
)
{
if
(
tmp
&
1
)
return
iterator
(
*
this
,
i
);
if
(
tmp
>
0
)
{
int
offset
=
__builtin_ctz
(
tmp
);
if
(
offset
<
N
)
return
iterator
(
*
this
,
offset
);
}
return
iterator
(
*
this
,
N
);
}
...
...
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