#18963 Minimize compiler warnings (finish)

This commit is contained in:
eap 2020-12-10 14:39:46 +03:00
parent 2f4749af53
commit fba6d9eef3
4 changed files with 28 additions and 28 deletions

View File

@ -352,10 +352,10 @@ namespace MED
TGaussInfo::TLess TGaussInfo::TLess
::operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const ::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; 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; return false;
if(theLeft.myGeom != theRight.myGeom) if(theLeft.myGeom != theRight.myGeom)

View File

@ -3857,9 +3857,9 @@ void SMESH_MeshEditor::Smooth (TIDSortedElemSet & theElems,
} }
else { else {
if ( isUPeriodic ) 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 ) 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 // check new UV
// if ( posType != SMDS_TOP_3DSPACE ) // if ( posType != SMDS_TOP_3DSPACE )
// dist2 = pNode.SquareDistance( surface->Value( newUV.X(), newUV.Y() )); // dist2 = pNode.SquareDistance( surface->Value( newUV.X(), newUV.Y() ));

View File

@ -4132,30 +4132,30 @@ namespace { // Structures used by FixQuadraticElements()
*/ */
//================================================================================ //================================================================================
bool QFace::IsSpoiled(const QLink* bentLink ) const // todo: unused // bool QFace::IsSpoiled(const QLink* bentLink ) const
{ // {
// code is valid for convex faces only // // code is valid for convex faces only
gp_XYZ gc(0,0,0); // gp_XYZ gc(0,0,0);
for ( TIDSortedNodeSet::const_iterator n = begin(); n != end(); ++n ) // for ( TIDSortedNodeSet::const_iterator n = begin(); n != end(); ++n )
gc += XYZ( *n ) / double( size() ); // gc += XYZ( *n ) / double( size() );
for ( size_t i = 0; i < _sides.size(); ++i ) // for ( size_t i = 0; i < _sides.size(); ++i )
{ // {
if ( _sides[i] == bentLink ) continue; // if ( _sides[i] == bentLink ) continue;
gp_Vec linkNorm = _normal ^ gp_Vec( XYZ(_sides[i]->node1()), XYZ(_sides[i]->node2())); // gp_Vec linkNorm = _normal ^ gp_Vec( XYZ(_sides[i]->node1()), XYZ(_sides[i]->node2()));
gp_Vec vecOut( gc, _sides[i]->MiddlePnt() ); // gp_Vec vecOut( gc, _sides[i]->MiddlePnt() );
if ( linkNorm * vecOut < 0 ) // if ( linkNorm * vecOut < 0 )
linkNorm.Reverse(); // linkNorm.Reverse();
double mag2 = linkNorm.SquareMagnitude(); // double mag2 = linkNorm.SquareMagnitude();
if ( mag2 > numeric_limits<double>::min() ) // if ( mag2 > numeric_limits<double>::min() )
linkNorm /= sqrt( mag2 ); // linkNorm /= sqrt( mag2 );
gp_Vec vecBent ( _sides[i]->MiddlePnt(), bentLink->MediumPnt()); // gp_Vec vecBent ( _sides[i]->MiddlePnt(), bentLink->MediumPnt());
gp_Vec vecStraight( _sides[i]->MiddlePnt(), bentLink->MiddlePnt()); // gp_Vec vecStraight( _sides[i]->MiddlePnt(), bentLink->MiddlePnt());
if ( vecBent * linkNorm > -0.1*vecStraight.Magnitude() ) // if ( vecBent * linkNorm > -0.1*vecStraight.Magnitude() )
return true; // return true;
} // }
return false; // return false;
} // }
//================================================================================ //================================================================================
/*! /*!

View File

@ -211,7 +211,7 @@ QWidget* SMESHGUI_FilterLibraryDlg::createMainFrame (QWidget* theParent)
myTable->SetLibsEnabled(false); myTable->SetLibsEnabled(false);
myListBox->setMinimumHeight((int)(myTable->sizeHint().height() * 0.5)); myListBox->setMinimumHeight((int)(myTable->sizeHint().height() * 0.5));
//myListBox->setRowMode(QListWidget::FitToWidth); //VSR : TODO ??? //myListBox->setRowMode(QListWidget::FitToWidth);
myListBox->setSelectionMode(QListWidget::SingleSelection); myListBox->setSelectionMode(QListWidget::SingleSelection);
myOpenBtn->setAutoDefault(false); myOpenBtn->setAutoDefault(false);