Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
c7a5d5d2
Commit
c7a5d5d2
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Fix making state blocks -- forgot make_shared<>
parent
1bb7dca7
No related branches found
No related tags found
1 merge request
!323
Resolve "New data structure for storing stateblocks"
Pipeline
#4336
passed
5 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/core/state_block/has_state_blocks.h
+2
-2
2 additions, 2 deletions
include/core/state_block/has_state_blocks.h
with
2 additions
and
2 deletions
include/core/state_block/has_state_blocks.h
+
2
−
2
View file @
c7a5d5d2
...
...
@@ -94,7 +94,7 @@ template<typename SB, typename ... Args>
inline
std
::
shared_ptr
<
SB
>
HasStateBlocks
::
emplaceStateBlock
(
const
std
::
string
&
_sb_type
,
Args
&&
...
_args_of_derived_state_block_constructor
)
{
assert
(
state_block_map_
.
count
(
_sb_type
)
==
0
&&
"Trying to add a state block with an existing type!"
);
std
::
shared_ptr
<
SB
>
sb
(
std
::
forward
<
Args
>
(
_args_of_derived_state_block_constructor
)...);
std
::
shared_ptr
<
SB
>
sb
=
std
::
make_shared
<
SB
>
(
std
::
forward
<
Args
>
(
_args_of_derived_state_block_constructor
)...);
state_block_map_
.
emplace
(
_sb_type
,
sb
);
return
sb
;
}
...
...
@@ -103,7 +103,7 @@ template<typename ... Args>
inline
StateBlockPtr
HasStateBlocks
::
emplaceStateBlock
<
StateBlock
>
(
const
std
::
string
&
_sb_type
,
Args
&&
...
_args_of_base_state_block_constructor
)
{
assert
(
state_block_map_
.
count
(
_sb_type
)
==
0
&&
"Trying to add a state block with an existing type!"
);
std
::
shared_ptr
<
StateBlock
>
sb
(
std
::
forward
<
Args
>
(
_args_of_base_state_block_constructor
)...);
std
::
shared_ptr
<
StateBlock
>
sb
=
std
::
make_shared
<
StateBlock
>
(
std
::
forward
<
Args
>
(
_args_of_base_state_block_constructor
)...);
state_block_map_
.
emplace
(
_sb_type
,
sb
);
return
sb
;
}
...
...
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