Commit 0a4fe5bf authored by Julien Osman's avatar Julien Osman
Browse files

BUG: Use make_unique to instantiate unique_ptrs

parent 12591edb
Pipeline #5735 failed with stages
in 163 minutes and 49 seconds
......@@ -34,17 +34,16 @@ bool RPCTransformBase<TScalarType, NInputDimensions, NOutputDimensions>::SetMeta
try
{
Projection::RPCParam newParam = boost::any_cast<Projection::RPCParam>(imd[MDGeom::RPC]);
this->m_RPCParam.reset(&newParam);
this->m_RPCParam = std::make_unique<Projection::RPCParam>(newParam);
}
catch (boost::bad_any_cast)
{
return false;
}
GDALRPCTransformer newTrans = GDALRPCTransformer(
this->m_Transformer = std::make_unique<GDALRPCTransformer>(
m_RPCParam->LineOffset, m_RPCParam->SampleOffset, m_RPCParam->LatOffset, m_RPCParam->LonOffset, m_RPCParam->HeightOffset,
m_RPCParam->LineScale, m_RPCParam->SampleScale, m_RPCParam->LatScale, m_RPCParam->LonScale, m_RPCParam->HeightScale,
m_RPCParam->LineNum, m_RPCParam->LineDen, m_RPCParam->SampleNum, m_RPCParam->SampleDen);
this->m_Transformer.reset(&newTrans);
return true;
}
......
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