Commit 6e90cced authored by Max Lyon's avatar Max Lyon
Browse files

allow to force static casts when requesting properties

parent 41b6662b
Pipeline #258 passed with stage
......@@ -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) {
return *static_cast<PropT*>(*it);
PropT* prop = dynamic_cast<PropT*>(*it);
if(prop != NULL) return *prop;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment