Commit 71fb2c30 authored by Julien Michel's avatar Julien Michel
Browse files

COMP: Fixed constant arithmetic overflow warning

parent 4226b9e9
......@@ -69,7 +69,7 @@ ComplexMomentImageFunction<TInput,TOutput,TPrecision,TCoordRep>
if( !this->GetInputImage() )
{
otbMsgDevMacro( << "Pb with GetInputImage" );
return ( static_cast<ComplexType>( itk::NumericTraits<PrecisionType>::max(), itk::NumericTraits<PrecisionType>::max() ) );
return ( ComplexType(itk::NumericTraits<PrecisionType>::Zero, itk::NumericTraits<PrecisionType>::Zero ) );
}
if(this->GetNeighborhoodRadius()<0)
......
......@@ -141,7 +141,7 @@ ComplexMomentPathFunction<TInputPath,TOutput,TPrecision>
if( !this->GetInputPath() )
{
otbMsgDevMacro( << "Pb with GetInputPath" );
return static_cast<OutputType>(ComplexPrecisionType( itk::NumericTraits<PrecisionType>::max(), itk::NumericTraits<PrecisionType>::max() ) );
return static_cast<OutputType>(ComplexPrecisionType( itk::NumericTraits<PrecisionType>::Zero, itk::NumericTraits<PrecisionType>::Zero ) );
}
OutputType Result = Evaluate( *(this->GetInputPath()) );
......
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