From: eap Date: Thu, 10 Dec 2020 11:39:46 +0000 (+0300) Subject: #18963 Minimize compiler warnings (finish) X-Git-Tag: V9_7_0a1~42 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fba6d9eef3e5ebef6f9a3466ab6ccbd086889898;p=modules%2Fsmesh.git #18963 Minimize compiler warnings (finish) --- diff --git a/src/MEDWrapper/MED_Structures.cxx b/src/MEDWrapper/MED_Structures.cxx index aa7777c10..1b0cbd59e 100644 --- a/src/MEDWrapper/MED_Structures.cxx +++ b/src/MEDWrapper/MED_Structures.cxx @@ -352,10 +352,10 @@ namespace MED TGaussInfo::TLess ::operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const { - if(!&theLeft) // todo: address of reference can be assumed always non-null by compiler + if(!&theLeft) // address of reference can be assumed always non-null by compiler - OK return true; - if(!&theRight) // todo: address of reference can be assumed always non-null by compiler + if(!&theRight) //address of reference can be assumed always non-null by compiler - OK return false; if(theLeft.myGeom != theRight.myGeom) diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 68bdae7f6..08ea9ca65 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -3857,9 +3857,9 @@ void SMESH_MeshEditor::Smooth (TIDSortedElemSet & theElems, } else { if ( isUPeriodic ) - newUV.SetX( ElCLib::InPeriod( newUV.X(), u1, u2 )); // todo: u may be used unitialized + newUV.SetX( ElCLib::InPeriod( newUV.X(), u1, u2 )); if ( isVPeriodic ) - newUV.SetY( ElCLib::InPeriod( newUV.Y(), v1, v2 )); // todo: v may be used unitialized + newUV.SetY( ElCLib::InPeriod( newUV.Y(), v1, v2 )); // check new UV // if ( posType != SMDS_TOP_3DSPACE ) // dist2 = pNode.SquareDistance( surface->Value( newUV.X(), newUV.Y() )); diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 43f3de4eb..d17b4e66c 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -4132,30 +4132,30 @@ namespace { // Structures used by FixQuadraticElements() */ //================================================================================ - bool QFace::IsSpoiled(const QLink* bentLink ) const // todo: unused - { - // code is valid for convex faces only - gp_XYZ gc(0,0,0); - for ( TIDSortedNodeSet::const_iterator n = begin(); n != end(); ++n ) - gc += XYZ( *n ) / double( size() ); - for ( size_t i = 0; i < _sides.size(); ++i ) - { - if ( _sides[i] == bentLink ) continue; - gp_Vec linkNorm = _normal ^ gp_Vec( XYZ(_sides[i]->node1()), XYZ(_sides[i]->node2())); - gp_Vec vecOut( gc, _sides[i]->MiddlePnt() ); - if ( linkNorm * vecOut < 0 ) - linkNorm.Reverse(); - double mag2 = linkNorm.SquareMagnitude(); - if ( mag2 > numeric_limits::min() ) - linkNorm /= sqrt( mag2 ); - gp_Vec vecBent ( _sides[i]->MiddlePnt(), bentLink->MediumPnt()); - gp_Vec vecStraight( _sides[i]->MiddlePnt(), bentLink->MiddlePnt()); - if ( vecBent * linkNorm > -0.1*vecStraight.Magnitude() ) - return true; - } - return false; + // bool QFace::IsSpoiled(const QLink* bentLink ) const + // { + // // code is valid for convex faces only + // gp_XYZ gc(0,0,0); + // for ( TIDSortedNodeSet::const_iterator n = begin(); n != end(); ++n ) + // gc += XYZ( *n ) / double( size() ); + // for ( size_t i = 0; i < _sides.size(); ++i ) + // { + // if ( _sides[i] == bentLink ) continue; + // gp_Vec linkNorm = _normal ^ gp_Vec( XYZ(_sides[i]->node1()), XYZ(_sides[i]->node2())); + // gp_Vec vecOut( gc, _sides[i]->MiddlePnt() ); + // if ( linkNorm * vecOut < 0 ) + // linkNorm.Reverse(); + // double mag2 = linkNorm.SquareMagnitude(); + // if ( mag2 > numeric_limits::min() ) + // linkNorm /= sqrt( mag2 ); + // gp_Vec vecBent ( _sides[i]->MiddlePnt(), bentLink->MediumPnt()); + // gp_Vec vecStraight( _sides[i]->MiddlePnt(), bentLink->MiddlePnt()); + // if ( vecBent * linkNorm > -0.1*vecStraight.Magnitude() ) + // return true; + // } + // return false; - } + // } //================================================================================ /*! diff --git a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx index 4c88cce9b..d692e9ef7 100644 --- a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx @@ -211,7 +211,7 @@ QWidget* SMESHGUI_FilterLibraryDlg::createMainFrame (QWidget* theParent) myTable->SetLibsEnabled(false); myListBox->setMinimumHeight((int)(myTable->sizeHint().height() * 0.5)); - //myListBox->setRowMode(QListWidget::FitToWidth); //VSR : TODO ??? + //myListBox->setRowMode(QListWidget::FitToWidth); myListBox->setSelectionMode(QListWidget::SingleSelection); myOpenBtn->setAutoDefault(false);