Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenVolumeMesh
OpenVolumeMesh
Commits
6e90cced
Commit
6e90cced
authored
Dec 07, 2015
by
Max Lyon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow to force static casts when requesting properties
parent
41b6662b
Pipeline
#258
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/OpenVolumeMesh/Core/ResourceManagerT.cc
src/OpenVolumeMesh/Core/ResourceManagerT.cc
+4
-0
No files found.
src/OpenVolumeMesh/Core/ResourceManagerT.cc
View file @
6e90cced
...
...
@@ -96,8 +96,12 @@ PropT ResourceManager::request_property(StdVecT& _vec, const std::string& _name,
for
(
typename
StdVecT
::
iterator
it
=
_vec
.
begin
();
it
!=
_vec
.
end
();
++
it
)
{
if
((
*
it
)
->
name
()
==
_name
)
{
#if OVM_FORCE_STATIC_CAST
return
*
static_cast
<
PropT
*>
(
*
it
);
#else
PropT
*
prop
=
dynamic_cast
<
PropT
*>
(
*
it
);
if
(
prop
!=
NULL
)
return
*
prop
;
#endif
}
}
}
...
...
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