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
63b6051c
Commit
63b6051c
authored
May 09, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue with serialization of empty any tuples
parent
e9c0ca27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
src/uniform_type_info_map.cpp
src/uniform_type_info_map.cpp
+11
-6
No files found.
src/uniform_type_info_map.cpp
View file @
63b6051c
...
@@ -287,14 +287,19 @@ void deserialize_impl(channel& ptrref, deserializer* source) {
...
@@ -287,14 +287,19 @@ void deserialize_impl(channel& ptrref, deserializer* source) {
}
}
void
serialize_impl
(
const
any_tuple
&
tup
,
serializer
*
sink
)
{
void
serialize_impl
(
const
any_tuple
&
tup
,
serializer
*
sink
)
{
auto
tname
=
tup
.
tuple_type_names
();
std
::
string
dynamic_name
;
// used if tup holds an object_array
auto
uti
=
get_uniform_type_info_map
()
// ttn can be nullptr even if tuple is not empty (in case of object_array)
->
by_uniform_name
(
tname
const
std
::
string
*
ttn
=
tup
.
empty
()
?
nullptr
:
tup
.
tuple_type_names
();
?
*
tname
const
char
*
tname
=
ttn
?
ttn
->
data
()
:
(
tup
.
empty
()
?
"@<>"
:
nullptr
);
:
detail
::
get_tuple_type_names
(
*
tup
.
vals
()));
if
(
!
tname
)
{
// tuple is not empty, i.e., we are dealing with an object array
dynamic_name
=
detail
::
get_tuple_type_names
(
*
tup
.
vals
());
tname
=
dynamic_name
.
c_str
();
}
auto
uti
=
get_uniform_type_info_map
()
->
by_uniform_name
(
tname
);
if
(
uti
==
nullptr
)
{
if
(
uti
==
nullptr
)
{
std
::
string
err
=
"could not get uniform type info for
\"
"
;
std
::
string
err
=
"could not get uniform type info for
\"
"
;
err
+=
tname
?
*
tname
:
detail
::
get_tuple_type_names
(
*
tup
.
vals
())
;
err
+=
tname
;
err
+=
"
\"
"
;
err
+=
"
\"
"
;
CPPA_LOGF_ERROR
(
err
);
CPPA_LOGF_ERROR
(
err
);
throw
std
::
runtime_error
(
err
);
throw
std
::
runtime_error
(
err
);
...
...
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