Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scord
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eu
ADMIRE
scord
Commits
79d7202a
Verified
Commit
79d7202a
authored
2 years ago
by
Alberto Miranda
Browse files
Options
Downloads
Patches
Plain Diff
Add copy constructor and assignment operator for admire::adhoc_storage
parent
a1b71cb2
No related branches found
No related tags found
1 merge request
!37
Resolve "Missing copy constructor and assignment operator in admire::adhoc_storage and admire::pfs_storage"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/api/admire_types.hpp
+3
-0
3 additions, 0 deletions
src/common/api/admire_types.hpp
src/common/api/types.cpp
+10
-0
10 additions, 0 deletions
src/common/api/types.cpp
with
13 additions
and
0 deletions
src/common/api/admire_types.hpp
+
3
−
0
View file @
79d7202a
...
...
@@ -176,8 +176,11 @@ struct adhoc_storage : public storage {
bool
should_flush
);
adhoc_storage
(
enum
storage
::
type
type
,
std
::
string
id
,
ADM_adhoc_context_t
ctx
);
adhoc_storage
(
const
adhoc_storage
&
other
)
noexcept
;
adhoc_storage
(
adhoc_storage
&&
)
noexcept
=
default
;
adhoc_storage
&
operator
=
(
const
adhoc_storage
&
)
noexcept
;
adhoc_storage
&
operator
=
(
adhoc_storage
&&
)
noexcept
=
default
;
~
adhoc_storage
()
override
;
...
...
This diff is collapsed.
Click to expand it.
src/common/api/types.cpp
+
10
−
0
View file @
79d7202a
...
...
@@ -924,6 +924,16 @@ adhoc_storage::adhoc_storage(enum storage::type type, std::string id,
:
storage
(
type
,
std
::
move
(
id
)),
m_pimpl
(
std
::
make_unique
<
impl
>
(
adhoc_storage
::
ctx
{
ctx
}))
{}
adhoc_storage
::
adhoc_storage
(
const
adhoc_storage
&
other
)
noexcept
:
storage
(
other
.
m_type
,
other
.
m_id
),
m_pimpl
(
std
::
make_unique
<
impl
>
(
*
other
.
m_pimpl
))
{}
adhoc_storage
&
adhoc_storage
::
operator
=
(
const
adhoc_storage
&
other
)
noexcept
{
this
->
m_pimpl
=
std
::
make_unique
<
impl
>
(
*
other
.
m_pimpl
);
return
*
this
;
}
std
::
shared_ptr
<
storage
::
ctx
>
adhoc_storage
::
context
()
const
{
return
std
::
make_shared
<
adhoc_storage
::
ctx
>
(
m_pimpl
->
context
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment