Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
llvm-watermarker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nagayama15
llvm-watermarker
Commits
e08595f5
Commit
e08595f5
authored
Dec 09, 2018
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bit stream.
parent
ffdff2ba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
CircularBitStream.hpp
src/nykk/CircularBitStream.hpp
+1
-1
TestCircularBitStream.hpp
test/TestCircularBitStream.hpp
+3
-0
No files found.
src/nykk/CircularBitStream.hpp
View file @
e08595f5
...
@@ -65,7 +65,7 @@ namespace nykk
...
@@ -65,7 +65,7 @@ namespace nykk
for
(
std
::
size_t
i
=
0
;
i
<
size_bits
;
i
++
)
for
(
std
::
size_t
i
=
0
;
i
<
size_bits
;
i
++
)
{
{
data
|=
read_bit
()
?
1
<<
i
:
0
;
data
|=
read_bit
()
?
std
::
uint64_t
{
1
}
<<
i
:
0
;
}
}
return
data
;
return
data
;
...
...
test/TestCircularBitStream.hpp
View file @
e08595f5
...
@@ -22,6 +22,9 @@ inline void run_test_circular_bit_stream()
...
@@ -22,6 +22,9 @@ inline void run_test_circular_bit_stream()
assert
(
s
.
read
(
16
)
==
0xb98e
);
assert
(
s
.
read
(
16
)
==
0xb98e
);
assert
(
s
.
pos_bit
()
==
4
);
assert
(
s
.
pos_bit
()
==
4
);
assert
(
s
.
read
(
64
)
==
0xb98efcdab98efcda
);
assert
(
s
.
pos_bit
()
==
4
);
}
}
#endif
#endif
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