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
ecc37096
Commit
ecc37096
authored
Jul 11, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix recursion issue in composable behaviors
parent
463c9c20
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
libcaf_core/caf/abstract_composable_behavior.hpp
libcaf_core/caf/abstract_composable_behavior.hpp
+1
-1
libcaf_core/caf/composable_behavior.hpp
libcaf_core/caf/composable_behavior.hpp
+5
-1
libcaf_core/caf/composed_behavior.hpp
libcaf_core/caf/composed_behavior.hpp
+6
-2
No files found.
libcaf_core/caf/abstract_composable_behavior.hpp
View file @
ecc37096
...
@@ -31,7 +31,7 @@ class abstract_composable_behavior {
...
@@ -31,7 +31,7 @@ class abstract_composable_behavior {
public:
public:
virtual
~
abstract_composable_behavior
();
virtual
~
abstract_composable_behavior
();
virtual
unit_t
init_behavior
(
message_handler
&
x
)
=
0
;
virtual
void
init_behavior
(
message_handler
&
x
)
=
0
;
};
};
}
// namespace caf
}
// namespace caf
...
...
libcaf_core/caf/composable_behavior.hpp
View file @
ecc37096
...
@@ -89,7 +89,11 @@ public:
...
@@ -89,7 +89,11 @@ public:
return
unit
;
return
unit
;
}
}
unit_t
init_behavior
(
message_handler
&
x
)
override
{
void
init_behavior
(
message_handler
&
x
)
override
{
init_behavior_impl
(
x
);
}
unit_t
init_behavior_impl
(
message_handler
&
x
)
{
if
(
x
)
if
(
x
)
x
=
x
.
or_else
(
composable_behavior_base
<
Clauses
>::
make_callback
()...);
x
=
x
.
or_else
(
composable_behavior_base
<
Clauses
>::
make_callback
()...);
else
else
...
...
libcaf_core/caf/composed_behavior.hpp
View file @
ecc37096
...
@@ -57,8 +57,12 @@ public:
...
@@ -57,8 +57,12 @@ public:
return
unit
(
static_cast
<
Ts
*>
(
this
)
->
init_selfptr
(
x
)...);
return
unit
(
static_cast
<
Ts
*>
(
this
)
->
init_selfptr
(
x
)...);
}
}
unit_t
init_behavior
(
message_handler
&
x
)
override
{
void
init_behavior
(
message_handler
&
x
)
override
{
return
unit
(
static_cast
<
Ts
*>
(
this
)
->
init_behavior
(
x
)...);
init_behavior_impl
(
x
);
}
unit_t
init_behavior_impl
(
message_handler
&
x
)
{
return
unit
(
static_cast
<
Ts
*>
(
this
)
->
init_behavior_impl
(
x
)...);
}
}
protected:
protected:
...
...
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