From: apo Date: Wed, 12 Jan 2005 13:14:05 +0000 (+0000) Subject: Remove unused variables X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=49897c5dfd60af1a1e146651a329132762e0d3f2;p=modules%2Fsmesh.git Remove unused variables --- diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index d0ee98ef4..3e31f7151 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -958,10 +958,8 @@ bool Length2D::Value::operator<(const Length2D::Value& x) const{ void Length2D::GetValues(TValues& theValues){ TValues aValues; SMDS_FaceIteratorPtr anIter = myMesh->facesIterator(); - int i = 0; for(; anIter->more(); ){ const SMDS_MeshFace* anElem = anIter->next(); - long anElemId = anElem->GetID(); SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator(); long aNodeId[2]; gp_Pnt P[3]; diff --git a/src/Controls/SMESH_ControlsDef.hxx b/src/Controls/SMESH_ControlsDef.hxx index 4244c0b0d..50fb06558 100644 --- a/src/Controls/SMESH_ControlsDef.hxx +++ b/src/Controls/SMESH_ControlsDef.hxx @@ -106,7 +106,7 @@ namespace SMESH{ NumericalFunctor(); virtual void SetMesh( SMDS_Mesh* theMesh ); virtual double GetValue( long theElementId ); - virtual double GetValue(const TSequenceOfXYZ& thePoints) {}; + virtual double GetValue(const TSequenceOfXYZ& thePoints) { return -1.0;}; virtual SMDSAbs_ElementType GetType() const = 0; virtual double GetBadRate( double Value, int nbNodes ) const = 0; long GetPrecision() const; diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx index fb77446a9..16ead487f 100644 --- a/src/OBJECT/SMESH_DeviceActor.cxx +++ b/src/OBJECT/SMESH_DeviceActor.cxx @@ -24,7 +24,7 @@ // File : SMESH_Actor.cxx // Author : Nicolas REJNERI // Module : SMESH -// $Header$Header: /home/server/cvs/SMESH/SMESH_SRC/src/OBJECT/SMESH_DeviceActor.cxx,v 1.5.2.4 2004/12/27 12:49:55 apo Exp $ +// $Header$Header$ #include "SMESH_DeviceActor.h" @@ -299,8 +299,7 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor anIdList->SetNumberOfIds(2); Length2D::TValues::const_iterator anIter = aValues.begin(); - int i = 0; - for(vtkIdType aVtkId; anIter != aValues.end(); anIter++,i++){ + for(vtkIdType aVtkId = 0; anIter != aValues.end(); anIter++,aVtkId++){ const Length2D::Value& aValue = *anIter; int aNode[2] = { myVisualObj->GetNodeVTKId(aValue.myPntId[0]), @@ -311,7 +310,7 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor anIdList->SetId( 1, aNode[1] ); aConnectivity->InsertNextCell( anIdList ); aCellTypesArray->InsertNextValue( VTK_LINE ); - aScalars->SetValue(i,aValue.myLength); + aScalars->SetValue(aVtkId,aValue.myLength); } } diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx index 66bc89083..46e57b451 100755 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx @@ -906,7 +906,6 @@ void SMESHGUI_FilterTable::onAddBtn() int aType = GetType(); addRow( myTables[ aType ], aType ); - Table* aTable = myTables[ aType ]; Update(); } @@ -1348,9 +1347,6 @@ SMESHGUI_FilterTable::Table* SMESHGUI_FilterTable::createTable( QWidget* thePar static int aLenCr = abs( aMaxLenCr - aMetrics.width( tr( "CRITERION" ) ) ) / aMetrics.width( ' ' ) + 5; - static int aLenCo = abs( maxLength( getCompare(), aMetrics ) - - aMetrics.width( tr( "COMPARE" ) ) ) / aMetrics.width( ' ' ) + 5; - QString aCrStr; aCrStr.fill( ' ', aLenCr ); QString aCoStr; @@ -2319,7 +2315,7 @@ void SMESHGUI_FilterDlg::filterSelectionSource( const int theType, if ( aSelMap.Extent() > 0 ) { - if(SMESH_Actor *anActor = SMESH::FindActorByEntry( anIter.Key()->getEntry() ) ) + if( SMESH::FindActorByEntry( anIter.Key()->getEntry() ) ) { for ( int i = 1; i <= aSelMap.Extent(); i++ ) aToBeFiltered.Add( aSelMap(i) ); diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx index da8fde1c9..bdb3a8fd7 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx @@ -176,7 +176,6 @@ QFrame* SMESHGUI_MeshPatternDlg::createMainFrame( QWidget* theParent ) // Pictures 2d and 3d for ( int i = 0; i < 2; i++ ) { - QWidget* aPreview, *aPicture; if ( i == 0 ) { myPicture2d = new SMESHGUI_PatternWidget( aPatGrp ), @@ -798,7 +797,7 @@ void SMESHGUI_MeshPatternDlg::displayPreview() vtkProperty* aProp = vtkProperty::New(); aProp->SetRepresentationToWireframe(); aProp->SetColor( 250, 0, 250 ); - if ( SMESH_Actor* anActor = SMESH::FindActorByObject( myMesh ) ) + if ( SMESH::FindActorByObject( myMesh ) ) aProp->SetLineWidth( SMESH::GetFloat( "SMESH:SettingsWidth", 1 ) +1 ); else aProp->SetLineWidth( 1 ); diff --git a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx index b55413f09..c2474d067 100644 --- a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx @@ -602,7 +602,6 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged() myActor = anActor; vtkScalarBarActor* myScalarBarActor = myActor->GetScalarBarActor(); - double aMin = 0.0, aMax = 0.0; if ( myScalarBarActor->GetLookupTable() ) { float *range = myScalarBarActor->GetLookupTable()->GetRange(); myMinEdit->setText( QString::number( range[0] ) ); diff --git a/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx b/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx index 35b9df5ef..00ede0b48 100644 --- a/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx @@ -246,7 +246,6 @@ void SMESHGUI_RenumberingDlg::ClickOnApply() if ( !myMesh->_is_nil()) { - bool aResult = false; try { SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();