Commit e76c2d50 authored by Laurențiu Nicola's avatar Laurențiu Nicola
Browse files

Merge branch 'bad-any-cast' into 'develop'

COMP: Catch bad_any_cast by reference, not value

See merge request !792
parents 5b71e724 9b0259cd
Pipeline #6836 passed with stages
in 22 minutes and 57 seconds
...@@ -38,7 +38,7 @@ bool RPCTransformBase<TScalarType, NInputDimensions, NOutputDimensions>::SetMeta ...@@ -38,7 +38,7 @@ bool RPCTransformBase<TScalarType, NInputDimensions, NOutputDimensions>::SetMeta
{ {
this->m_RPCParam = std::make_unique<Projection::RPCParam>(boost::any_cast<Projection::RPCParam>(imd[MDGeom::RPC])); this->m_RPCParam = std::make_unique<Projection::RPCParam>(boost::any_cast<Projection::RPCParam>(imd[MDGeom::RPC]));
} }
catch (boost::bad_any_cast) catch (const boost::bad_any_cast&)
{ {
return false; return false;
} }
...@@ -64,6 +64,6 @@ void RPCTransformBase<TScalarType, NInputDimensions, NOutputDimensions>::PrintSe ...@@ -64,6 +64,6 @@ void RPCTransformBase<TScalarType, NInputDimensions, NOutputDimensions>::PrintSe
os << indent << "RPC Model: " << this->m_RPCParam.get()->ToJSON() << std::endl; os << indent << "RPC Model: " << this->m_RPCParam.get()->ToJSON() << std::endl;
} }
} } // namespace otb
#endif #endif
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