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
afdcaf79
Commit
afdcaf79
authored
Feb 19, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cppcheck fixes, reimplement `test_match_expr`
parent
b47702ee
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
123 additions
and
130 deletions
+123
-130
libcaf_core/src/uniform_type_info_map.cpp
libcaf_core/src/uniform_type_info_map.cpp
+3
-5
libcaf_io/src/default_multiplexer.cpp
libcaf_io/src/default_multiplexer.cpp
+4
-5
unit_testing/CMakeLists.txt
unit_testing/CMakeLists.txt
+1
-0
unit_testing/test_match_expr.cpp
unit_testing/test_match_expr.cpp
+115
-120
No files found.
libcaf_core/src/uniform_type_info_map.cpp
View file @
afdcaf79
...
@@ -226,7 +226,6 @@ void deserialize_impl(channel& ptrref, deserializer* source) {
...
@@ -226,7 +226,6 @@ void deserialize_impl(channel& ptrref, deserializer* source) {
}
}
void
serialize_impl
(
const
message
&
tup
,
serializer
*
sink
)
{
void
serialize_impl
(
const
message
&
tup
,
serializer
*
sink
)
{
std
::
string
dynamic_name
;
// used if tup holds an object_array
// ttn can be nullptr even if tuple is not empty (in case of object_array)
// ttn can be nullptr even if tuple is not empty (in case of object_array)
std
::
string
tname
=
tup
.
empty
()
?
"@<>"
:
tup
.
tuple_type_names
();
std
::
string
tname
=
tup
.
empty
()
?
"@<>"
:
tup
.
tuple_type_names
();
auto
uti_map
=
detail
::
singletons
::
get_uniform_type_info_map
();
auto
uti_map
=
detail
::
singletons
::
get_uniform_type_info_map
();
...
@@ -485,8 +484,7 @@ protected:
...
@@ -485,8 +484,7 @@ protected:
class
default_meta_message
:
public
uniform_type_info
{
class
default_meta_message
:
public
uniform_type_info
{
public:
public:
default_meta_message
(
const
std
::
string
&
tname
)
{
default_meta_message
(
const
std
::
string
&
tname
)
:
m_name
(
tname
)
{
m_name
=
tname
;
std
::
vector
<
std
::
string
>
elements
;
std
::
vector
<
std
::
string
>
elements
;
split
(
elements
,
tname
,
is_any_of
(
"+"
));
split
(
elements
,
tname
,
is_any_of
(
"+"
));
auto
uti_map
=
detail
::
singletons
::
get_uniform_type_info_map
();
auto
uti_map
=
detail
::
singletons
::
get_uniform_type_info_map
();
...
@@ -555,11 +553,11 @@ template <class Iterator>
...
@@ -555,11 +553,11 @@ template <class Iterator>
struct
builtin_types_helper
{
struct
builtin_types_helper
{
Iterator
pos
;
Iterator
pos
;
builtin_types_helper
(
Iterator
first
)
:
pos
(
first
)
{}
builtin_types_helper
(
Iterator
first
)
:
pos
(
first
)
{}
inline
void
operator
()()
{
void
operator
()()
const
{
// end of recursion
// end of recursion
}
}
template
<
class
T
,
class
...
Ts
>
template
<
class
T
,
class
...
Ts
>
inline
void
operator
()(
T
&
arg
,
Ts
&
...
args
)
{
void
operator
()(
T
&
arg
,
Ts
&
...
args
)
{
*
pos
++
=
&
arg
;
*
pos
++
=
&
arg
;
(
*
this
)(
args
...);
(
*
this
)(
args
...);
}
}
...
...
libcaf_io/src/default_multiplexer.cpp
View file @
afdcaf79
...
@@ -406,10 +406,9 @@ namespace network {
...
@@ -406,10 +406,9 @@ namespace network {
// altering the pollset while traversing it is not exactly a
// altering the pollset while traversing it is not exactly a
// bright idea ...
// bright idea ...
struct
fd_event
{
struct
fd_event
{
native_socket
fd
;
// our file descriptor
native_socket
fd
;
// our file descriptor
short
mask
;
// the event mask returned by poll()
short
mask
;
// the event mask returned by poll()
short
fd_mask
;
// the mask associated with fd
event_handler
*
ptr
;
// nullptr in case of a pipe event
event_handler
*
ptr
;
// nullptr in case of a pipe event
};
};
std
::
vector
<
fd_event
>
poll_res
;
std
::
vector
<
fd_event
>
poll_res
;
while
(
!
m_pollset
.
empty
())
{
while
(
!
m_pollset
.
empty
())
{
...
@@ -449,7 +448,7 @@ namespace network {
...
@@ -449,7 +448,7 @@ namespace network {
if
(
pfd
.
revents
!=
0
)
{
if
(
pfd
.
revents
!=
0
)
{
CAF_LOG_DEBUG
(
"event on socket "
<<
pfd
.
fd
CAF_LOG_DEBUG
(
"event on socket "
<<
pfd
.
fd
<<
", revents = "
<<
pfd
.
revents
);
<<
", revents = "
<<
pfd
.
revents
);
poll_res
.
push_back
({
pfd
.
fd
,
pfd
.
revents
,
pfd
.
events
,
m_shadow
[
i
]});
poll_res
.
push_back
({
pfd
.
fd
,
pfd
.
revents
,
m_shadow
[
i
]});
pfd
.
revents
=
0
;
pfd
.
revents
=
0
;
--
presult
;
// stop as early as possible
--
presult
;
// stop as early as possible
}
}
...
...
unit_testing/CMakeLists.txt
View file @
afdcaf79
...
@@ -21,6 +21,7 @@ add_unit_test(atom)
...
@@ -21,6 +21,7 @@ add_unit_test(atom)
add_unit_test
(
metaprogramming
)
add_unit_test
(
metaprogramming
)
add_unit_test
(
intrusive_containers
)
add_unit_test
(
intrusive_containers
)
add_unit_test
(
match
)
add_unit_test
(
match
)
add_unit_test
(
match_expr
)
add_unit_test
(
message
)
add_unit_test
(
message
)
add_unit_test
(
serialization
)
add_unit_test
(
serialization
)
add_unit_test
(
uniform_type
)
add_unit_test
(
uniform_type
)
...
...
unit_testing/test_match_expr.cpp
View file @
afdcaf79
This diff is collapsed.
Click to expand it.
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