Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
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
Operations
Operations
Metrics
Environments
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
cpp-libs
Actor Framework
Commits
e4b1bb30
Commit
e4b1bb30
authored
Apr 07, 2023
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unused-but-set-variable warning
parent
c41f1c24
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
14 deletions
+9
-14
libcaf_core/caf/policy/select_any.hpp
libcaf_core/caf/policy/select_any.hpp
+2
-3
libcaf_core/caf/scheduled_actor.hpp
libcaf_core/caf/scheduled_actor.hpp
+6
-10
libcaf_io/caf/io/network/datagram_handler.hpp
libcaf_io/caf/io/network/datagram_handler.hpp
+1
-1
No files found.
libcaf_core/caf/policy/select_any.hpp
View file @
e4b1bb30
...
@@ -26,9 +26,8 @@ struct select_any_factory<F, type_list<Ts...>> {
...
@@ -26,9 +26,8 @@ struct select_any_factory<F, type_list<Ts...>> {
template
<
class
Fun
>
template
<
class
Fun
>
static
auto
static
auto
make
(
std
::
shared_ptr
<
size_t
>
pending
,
disposable
timeouts
,
Fun
f
)
{
make
(
std
::
shared_ptr
<
size_t
>
pending
,
disposable
timeouts
,
Fun
f
)
{
using
std
::
move
;
return
[
pending
{
std
::
move
(
pending
)},
timeouts
{
std
::
move
(
timeouts
)},
return
[
pending
{
move
(
pending
)},
timeouts
{
move
(
timeouts
)},
f
{
std
::
move
(
f
)}](
Ts
...
xs
)
mutable
{
f
{
move
(
f
)}](
Ts
...
xs
)
mutable
{
CAF_LOG_TRACE
(
CAF_ARG2
(
"pending"
,
*
pending
));
CAF_LOG_TRACE
(
CAF_ARG2
(
"pending"
,
*
pending
));
if
(
*
pending
>
0
)
{
if
(
*
pending
>
0
)
{
timeouts
.
dispose
();
timeouts
.
dispose
();
...
...
libcaf_core/caf/scheduled_actor.hpp
View file @
e4b1bb30
...
@@ -286,8 +286,8 @@ public:
...
@@ -286,8 +286,8 @@ public:
template
<
class
F
>
template
<
class
F
>
std
::
enable_if_t
<
std
::
is_invocable_r_v
<
skippable_result
,
F
,
message
&>>
std
::
enable_if_t
<
std
::
is_invocable_r_v
<
skippable_result
,
F
,
message
&>>
set_default_handler
(
F
fun
)
{
set_default_handler
(
F
fun
)
{
using
std
::
move
;
default_handler_
=
[
fn
{
std
::
move
(
fun
)}](
scheduled_actor
*
,
default_handler_
=
[
fn
{
move
(
fun
)}](
scheduled_actor
*
,
message
&
xs
)
mutable
{
message
&
xs
)
mutable
{
return
fn
(
xs
);
return
fn
(
xs
);
};
};
}
}
...
@@ -319,10 +319,8 @@ public:
...
@@ -319,10 +319,8 @@ public:
/// Sets a custom handler for down messages.
/// Sets a custom handler for down messages.
template
<
class
F
>
template
<
class
F
>
std
::
enable_if_t
<
std
::
is_invocable_v
<
F
,
down_msg
&>>
set_down_handler
(
F
fun
)
{
std
::
enable_if_t
<
std
::
is_invocable_v
<
F
,
down_msg
&>>
set_down_handler
(
F
fun
)
{
using
std
::
move
;
down_handler_
=
[
fn
{
std
::
move
(
fun
)}](
scheduled_actor
*
,
down_handler_
=
[
fn
{
move
(
fun
)}](
scheduled_actor
*
,
down_msg
&
x
)
mutable
{
down_msg
&
x
)
mutable
{
fn
(
x
);
};
fn
(
x
);
};
}
}
/// Sets a custom handler for node down messages.
/// Sets a custom handler for node down messages.
...
@@ -354,10 +352,8 @@ public:
...
@@ -354,10 +352,8 @@ public:
/// Sets a custom handler for exit messages.
/// Sets a custom handler for exit messages.
template
<
class
F
>
template
<
class
F
>
std
::
enable_if_t
<
std
::
is_invocable_v
<
F
,
exit_msg
&>>
set_exit_handler
(
F
fun
)
{
std
::
enable_if_t
<
std
::
is_invocable_v
<
F
,
exit_msg
&>>
set_exit_handler
(
F
fun
)
{
using
std
::
move
;
exit_handler_
=
[
fn
{
std
::
move
(
fun
)}](
scheduled_actor
*
,
exit_handler_
=
[
fn
{
move
(
fun
)}](
scheduled_actor
*
,
exit_msg
&
x
)
mutable
{
exit_msg
&
x
)
mutable
{
fn
(
x
);
};
fn
(
x
);
};
}
}
#ifdef CAF_ENABLE_EXCEPTIONS
#ifdef CAF_ENABLE_EXCEPTIONS
...
...
libcaf_io/caf/io/network/datagram_handler.hpp
View file @
e4b1bb30
...
@@ -56,7 +56,7 @@ public:
...
@@ -56,7 +56,7 @@ public:
/// @warning Must not be modified outside the IO multiplexers event loop
/// @warning Must not be modified outside the IO multiplexers event loop
/// once the stream has been started.
/// once the stream has been started.
void
enqueue_datagram
(
datagram_handle
hdl
,
byte_buffer
buf
)
{
void
enqueue_datagram
(
datagram_handle
hdl
,
byte_buffer
buf
)
{
wr_offline_buf_
.
emplace_back
(
hdl
,
move
(
buf
));
wr_offline_buf_
.
emplace_back
(
hdl
,
std
::
move
(
buf
));
}
}
/// Returns the read buffer of this stream.
/// Returns the read buffer of this stream.
...
...
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