Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
147bdbf5
Commit
147bdbf5
authored
Oct 25, 2017
by
knowledge4igor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings which are caused by C style cast
parent
7f953c11
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/spdlog/details/mpmc_bounded_q.h
include/spdlog/details/mpmc_bounded_q.h
+2
-2
No files found.
include/spdlog/details/mpmc_bounded_q.h
View file @
147bdbf5
...
@@ -88,7 +88,7 @@ public:
...
@@ -88,7 +88,7 @@ public:
{
{
cell
=
&
buffer_
[
pos
&
buffer_mask_
];
cell
=
&
buffer_
[
pos
&
buffer_mask_
];
size_t
seq
=
cell
->
sequence_
.
load
(
std
::
memory_order_acquire
);
size_t
seq
=
cell
->
sequence_
.
load
(
std
::
memory_order_acquire
);
intptr_t
dif
=
(
intptr_t
)
seq
-
(
intptr_t
)
pos
;
intptr_t
dif
=
static_cast
<
intptr_t
>
(
seq
)
-
static_cast
<
intptr_t
>
(
pos
)
;
if
(
dif
==
0
)
if
(
dif
==
0
)
{
{
if
(
enqueue_pos_
.
compare_exchange_weak
(
pos
,
pos
+
1
,
std
::
memory_order_relaxed
))
if
(
enqueue_pos_
.
compare_exchange_weak
(
pos
,
pos
+
1
,
std
::
memory_order_relaxed
))
...
@@ -117,7 +117,7 @@ public:
...
@@ -117,7 +117,7 @@ public:
cell
=
&
buffer_
[
pos
&
buffer_mask_
];
cell
=
&
buffer_
[
pos
&
buffer_mask_
];
size_t
seq
=
size_t
seq
=
cell
->
sequence_
.
load
(
std
::
memory_order_acquire
);
cell
->
sequence_
.
load
(
std
::
memory_order_acquire
);
intptr_t
dif
=
(
intptr_t
)
seq
-
(
intptr_t
)
(
pos
+
1
);
intptr_t
dif
=
static_cast
<
intptr_t
>
(
seq
)
-
static_cast
<
intptr_t
>
(
pos
+
1
);
if
(
dif
==
0
)
if
(
dif
==
0
)
{
{
if
(
dequeue_pos_
.
compare_exchange_weak
(
pos
,
pos
+
1
,
std
::
memory_order_relaxed
))
if
(
dequeue_pos_
.
compare_exchange_weak
(
pos
,
pos
+
1
,
std
::
memory_order_relaxed
))
...
...
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