cid#1695417: silence Division or modulo by float zero
Change-Id: I82d38055cf8ed40afa4d64216fa77193280cabd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207948 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
@@ -111,7 +111,12 @@ namespace basegfx
|
||||
aTextureTransform.translate(fTargetOffsetX, fTargetOffsetY);
|
||||
|
||||
// prepare aspect for texture
|
||||
const double fAspectRatio(fTools::equalZero(fTargetSizeY) ? 1.0 : fTargetSizeX / fTargetSizeY);
|
||||
double fAspectRatio(1.0);
|
||||
if(!fTools::equalZero(fTargetSizeY))
|
||||
{
|
||||
assert(fTargetSizeY != 0.0 && "help coverity see it's not zero");
|
||||
fAspectRatio = fTargetSizeX / fTargetSizeY;
|
||||
}
|
||||
|
||||
return ODFGradientInfo(aTextureTransform, fAspectRatio, nSteps);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user