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
c9092b45
Commit
c9092b45
authored
Apr 20, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made move ctor of any_tuple more efficient
parent
ca538378
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/any_tuple.cpp
src/any_tuple.cpp
+7
-3
No files found.
src/any_tuple.cpp
View file @
c9092b45
...
...
@@ -38,9 +38,7 @@ any_tuple::any_tuple() : m_vals(get_empty_tuple()) { }
any_tuple
::
any_tuple
(
detail
::
abstract_tuple
*
ptr
)
:
m_vals
(
ptr
)
{
}
any_tuple
::
any_tuple
(
any_tuple
&&
other
)
:
m_vals
(
get_empty_tuple
())
{
m_vals
.
swap
(
other
.
m_vals
);
}
any_tuple
::
any_tuple
(
any_tuple
&&
other
)
:
m_vals
(
std
::
move
(
other
.
m_vals
))
{
}
any_tuple
::
any_tuple
(
const
data_ptr
&
vals
)
:
m_vals
(
vals
)
{
}
...
...
@@ -54,28 +52,34 @@ void any_tuple::reset() {
}
void
*
any_tuple
::
mutable_at
(
size_t
p
)
{
CPPA_REQUIRE
(
m_vals
!=
nullptr
);
return
m_vals
->
mutable_at
(
p
);
}
const
void
*
any_tuple
::
at
(
size_t
p
)
const
{
CPPA_REQUIRE
(
m_vals
!=
nullptr
);
return
m_vals
->
at
(
p
);
}
const
uniform_type_info
*
any_tuple
::
type_at
(
size_t
p
)
const
{
CPPA_REQUIRE
(
m_vals
!=
nullptr
);
return
m_vals
->
type_at
(
p
);
}
bool
any_tuple
::
equals
(
const
any_tuple
&
other
)
const
{
CPPA_REQUIRE
(
m_vals
!=
nullptr
);
return
m_vals
->
equals
(
*
other
.
vals
());
}
any_tuple
any_tuple
::
drop
(
size_t
n
)
const
{
CPPA_REQUIRE
(
m_vals
!=
nullptr
);
if
(
n
==
0
)
return
*
this
;
if
(
n
>=
size
())
return
any_tuple
{};
return
any_tuple
{
detail
::
decorated_tuple
::
create
(
m_vals
,
n
)};
}
any_tuple
any_tuple
::
drop_right
(
size_t
n
)
const
{
CPPA_REQUIRE
(
m_vals
!=
nullptr
);
using
namespace
std
;
if
(
n
==
0
)
return
*
this
;
if
(
n
>=
size
())
return
any_tuple
{};
...
...
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