oox/source/drawingml/scene3dhelper.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 70b9a979dda072ddfe2d458d62396d853cd1f9cc Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Oct 18 14:53:19 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Oct 18 16:20:57 2024 +0200 tdf#163486: PVS: check can be simplified V728 An excessive check can be simplified. The '||' operator is surrounded by opposite expressions '!p3DProperties' and 'p3DProperties'. Change-Id: Iab3da21332f50a7414edff7283659106aa8d22e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175134 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/oox/source/drawingml/scene3dhelper.cxx b/oox/source/drawingml/scene3dhelper.cxx index ce8296050db6..7ad926b4bbf2 100644 --- a/oox/source/drawingml/scene3dhelper.cxx +++ b/oox/source/drawingml/scene3dhelper.cxx @@ -388,7 +388,7 @@ bool Scene3DHelper::setExtrusionProperties(const oox::drawingml::Shape3DProperti // all cases. rRotZ = basegfx::deg2rad<60000>(-rnMSOShapeRotation); - if (!p3DProperties || (p3DProperties && !(*p3DProperties).mnPreset.has_value())) + if (!p3DProperties || !(*p3DProperties).mnPreset.has_value()) return false; const sal_Int32 nCameraPrstID((*p3DProperties).mnPreset.value()); @@ -878,7 +878,7 @@ void lcl_tweakLightRig(std::vector<basegfx::B3DVector>& rLightDirVec, PrstLightR void Scene3DHelper::setLightingProperties(const oox::drawingml::Shape3DPropertiesPtr p3DProperties, const double& rfRotZ, oox::PropertyMap& rPropertyMap) { - if (!p3DProperties || (p3DProperties && !(*p3DProperties).mnLightRigType.has_value())) + if (!p3DProperties || !(*p3DProperties).mnLightRigType.has_value()) return; // get index of light rig in aPrstLightRigValuesArray