From c78775163ef785e628039bd8ca4b065dcca28994 Mon Sep 17 00:00:00 2001 From: Uwe Date: Sun, 19 Jun 2022 18:00:46 +0200 Subject: [PATCH] [Meh] Gui: remove unnecessary Boolean comparisons --- src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp | 2 +- src/Mod/Mesh/Gui/SoFCMeshObject.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp index 8d9d0467c1..dc0d90027f 100644 --- a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp +++ b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp @@ -565,7 +565,7 @@ void SoFCIndexedFaceSet::drawFaces(SoGLRenderAction *action) SbBool mode = Gui::SoFCInteractiveElement::get(state); unsigned int num = this->coordIndex.getNum()/4; - if (mode == false || num <= this->renderTriangleLimit) { + if (!mode || num <= this->renderTriangleLimit) { #ifdef RENDER_GLARRAYS SoMaterialBindingElement::Binding matbind = SoMaterialBindingElement::get(state); diff --git a/src/Mod/Mesh/Gui/SoFCMeshObject.cpp b/src/Mod/Mesh/Gui/SoFCMeshObject.cpp index 777fbd2105..c656bbc302 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshObject.cpp +++ b/src/Mod/Mesh/Gui/SoFCMeshObject.cpp @@ -649,7 +649,7 @@ void SoFCMeshObjectShape::GLRender(SoGLRenderAction *action) if (SoShapeHintsElement::getVertexOrdering(state) == SoShapeHintsElement::CLOCKWISE) ccw = false; - if (mode == false || mesh->countFacets() <= this->renderTriangleLimit) { + if (!mode || mesh->countFacets() <= this->renderTriangleLimit) { if (mbind != OVERALL) { drawFaces(mesh, &mb, mbind, needNormals, ccw); } @@ -1303,7 +1303,7 @@ void SoFCMeshSegmentShape::GLRender(SoGLRenderAction *action) if (SoShapeHintsElement::getVertexOrdering(state) == SoShapeHintsElement::CLOCKWISE) ccw = false; - if (mode == false || mesh->countFacets() <= this->renderTriangleLimit) { + if (!mode || mesh->countFacets() <= this->renderTriangleLimit) { if (mbind != OVERALL) drawFaces(mesh, &mb, mbind, needNormals, ccw); else