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
8df670f5
Commit
8df670f5
authored
Feb 08, 2023
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dead code
parent
86d0fb7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
25 deletions
+6
-25
libcaf_core/caf/flow/op/concat.hpp
libcaf_core/caf/flow/op/concat.hpp
+6
-25
No files found.
libcaf_core/caf/flow/op/concat.hpp
View file @
8df670f5
...
@@ -101,14 +101,7 @@ public:
...
@@ -101,14 +101,7 @@ public:
void
fwd_on_error
(
input_key
key
,
const
error
&
what
)
{
void
fwd_on_error
(
input_key
key
,
const
error
&
what
)
{
if
(
key
==
active_key_
||
key
==
factory_key_
)
{
if
(
key
==
active_key_
||
key
==
factory_key_
)
{
CAF_ASSERT
(
out_
);
CAF_ASSERT
(
out_
);
if
(
delay_error_
)
{
fin
(
&
what
);
if
(
!
err_
)
err_
=
what
;
subscribe_next
();
}
else
{
err_
=
what
;
fin
();
}
}
}
}
}
...
@@ -137,7 +130,6 @@ public:
...
@@ -137,7 +130,6 @@ public:
if
(
out_
)
{
if
(
out_
)
{
ctx_
->
delay_fn
([
strong_this
=
intrusive_ptr
<
concat_sub
>
{
this
}]
{
ctx_
->
delay_fn
([
strong_this
=
intrusive_ptr
<
concat_sub
>
{
this
}]
{
if
(
strong_this
->
out_
)
{
if
(
strong_this
->
out_
)
{
strong_this
->
err_
.
reset
();
strong_this
->
fin
();
strong_this
->
fin
();
}
}
});
});
...
@@ -152,7 +144,7 @@ public:
...
@@ -152,7 +144,7 @@ public:
}
}
private:
private:
void
fin
()
{
void
fin
(
const
error
*
err
=
nullptr
)
{
CAF_ASSERT
(
out_
);
CAF_ASSERT
(
out_
);
if
(
factory_sub_
)
{
if
(
factory_sub_
)
{
factory_sub_
.
dispose
();
factory_sub_
.
dispose
();
...
@@ -164,8 +156,8 @@ private:
...
@@ -164,8 +156,8 @@ private:
}
}
factory_key_
=
0
;
factory_key_
=
0
;
active_key_
=
0
;
active_key_
=
0
;
if
(
err
_
)
if
(
err
)
out_
.
on_error
(
err_
);
out_
.
on_error
(
*
err
);
else
else
out_
.
on_complete
();
out_
.
on_complete
();
out_
=
nullptr
;
out_
=
nullptr
;
...
@@ -177,12 +169,6 @@ private:
...
@@ -177,12 +169,6 @@ private:
/// Stores a handle to the subscribed observer.
/// Stores a handle to the subscribed observer.
observer
<
T
>
out_
;
observer
<
T
>
out_
;
/// Configures whether we carry on after an error.
bool
delay_error_
=
false
;
/// Caches an on_error reason if delay_error_ is true.
error
err_
;
/// Stores our input sources. The first input is active (subscribed to) while
/// Stores our input sources. The first input is active (subscribed to) while
/// the others are pending (not subscribed to).
/// the others are pending (not subscribed to).
std
::
vector
<
input_type
>
inputs_
;
std
::
vector
<
input_type
>
inputs_
;
...
@@ -245,13 +231,8 @@ private:
...
@@ -245,13 +231,8 @@ private:
template
<
class
Input
>
template
<
class
Input
>
void
add
(
Input
&&
x
)
{
void
add
(
Input
&&
x
)
{
using
input_t
=
std
::
decay_t
<
Input
>
;
using
input_t
=
std
::
decay_t
<
Input
>
;
if
constexpr
(
detail
::
is_iterable_v
<
input_t
>
)
{
static_assert
(
is_observable_v
<
input_t
>
);
for
(
auto
&
in
:
x
)
inputs_
.
emplace_back
(
std
::
move
(
x
).
as_observable
());
add
(
in
);
}
else
{
static_assert
(
is_observable_v
<
input_t
>
);
inputs_
.
emplace_back
(
std
::
move
(
x
).
as_observable
());
}
}
}
std
::
vector
<
input_type
>
inputs_
;
std
::
vector
<
input_type
>
inputs_
;
...
...
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