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
7b72f113
Verified
Commit
7b72f113
authored
2 years ago
by
Alberto Miranda
Browse files
Options
Downloads
Patches
Plain Diff
convert: Update conversions for adhoc_storage
parent
4d6a60e9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!42
Resolve "The C++ API should not rely on `unique_ptr`"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/api/convert.cpp
+5
-9
5 additions, 9 deletions
src/common/api/convert.cpp
with
5 additions
and
9 deletions
src/common/api/convert.cpp
+
5
−
9
View file @
7b72f113
...
...
@@ -103,15 +103,7 @@ convert(const std::optional<admire::adhoc_storage>& adhoc_storage) {
return
managed_ctype
<
ADM_storage_t
>
{};
}
auto
managed_ctx
=
convert
(
*
std
::
static_pointer_cast
<
admire
::
adhoc_storage
::
ctx
>
(
adhoc_storage
->
context
()));
ADM_storage_t
c_st
=
ADM_storage_create
(
adhoc_storage
->
user_id
().
c_str
(),
static_cast
<
ADM_storage_type_t
>
(
adhoc_storage
->
type
()),
managed_ctx
.
get
());
return
managed_ctype
<
ADM_storage_t
>
{
c_st
,
std
::
move
(
managed_ctx
)};
return
convert
(
adhoc_storage
.
value
());
}
managed_ctype
<
ADM_storage_t
>
...
...
@@ -124,6 +116,10 @@ convert(const admire::adhoc_storage& st) {
st
.
user_id
().
c_str
(),
static_cast
<
ADM_storage_type_t
>
(
st
.
type
()),
managed_ctx
.
get
());
if
(
st
.
id
())
{
c_st
->
s_server_id
=
static_cast
<
int64_t
>
(
st
.
id
().
value
());
}
return
managed_ctype
<
ADM_storage_t
>
{
c_st
,
std
::
move
(
managed_ctx
)};
}
...
...
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