// how many bytes follow?
int len = 0;
- if (s[i] >> 5 == 0b110 ) len = 1;
- else if (s[i] >> 4 == 0b1110 ) len = 2;
- else if (s[i] >> 3 == 0b11110) len = 3;
+ if (s[i] >> 5 == 0b110 ) len = 1; // todo: binary constants are a GCC extension
+ else if (s[i] >> 4 == 0b1110 ) len = 2; // todo: binary constants are a GCC extension
+ else if (s[i] >> 3 == 0b11110) len = 3; // todo: binary constants are a GCC extension
else
invalid = true;
// check the bytes
for ( int j = 0; j < len && !invalid; ++j )
- invalid = ( s[i+j+1] >> 6 != 0b10 );
+ invalid = ( s[i+j+1] >> 6 != 0b10 ); // todo: binary constants are a GCC extension
if ( invalid )
fixed[i] = '?';
ids[2] = ids[0] + _sizeX + 1;
ids[3] = ids[0] + ( k==_sizeZ ? _sizeX : 1);
}
- void IEdgeNodes( int i, int j, int k, cgsize_t* ids ) const // edge perpendiculaire to X (2D)
+ void IEdgeNodes( int i, int j, int /*k*/, cgsize_t* ids ) const // edge perpendiculaire to X (2D)
{
ids[0] = NodeID( i, j, 0 );
ids[1] = ids[0] + _sizeX;
}
- void JEdgeNodes( int i, int j, int k, cgsize_t* ids ) const
+ void JEdgeNodes( int i, int j, int /*k*/, cgsize_t* ids ) const
{
ids[0] = NodeID( i, j, 0 );
ids[1] = ids[0] + 1;
}
gp_XYZ Next()
{
- gp_XYZ res( _cur[0], _cur[1], _cur[2] );
+ gp_XYZ res( _cur[0], _cur[1], _cur[2] ); // todo: _cur can be used uninitialized
for ( int i = 0; i < _dim; ++i )
{
_cur[i] += _dir[i];
size *= _dir[i]*(_end[i]-_beg[i]);
return size;
}
- gp_XYZ Begin() const { return gp_XYZ( _beg[0], _beg[1], _beg[2] ); }
+ gp_XYZ Begin() const { return gp_XYZ( _beg[0], _beg[1], _beg[2] ); } // todo: _beg can be used uninitialized
//gp_XYZ End() const { return gp_XYZ( _end[0]-1, _end[1]-1, _end[2]-1 ); }
};
}
// fill nodeReplacementMap
- TPointRangeIterator rangeIt1( range, _meshDim );
+ TPointRangeIterator rangeIt1( range, _meshDim ); // todo: rangeIt1: _end[i], _dir[i], _beg[i], _cur[i] may be used uninitialized
TPointRangeIterator rangeIt2( donorRange, _meshDim );
gp_XYZ begin1 = rangeIt1.Begin(), begin2 = rangeIt2.Begin(), index1, index2;
if ( &zone2 == this )
PGetNodesFun getNodesFun = 0;
if ( elemType == SMDSAbs_Face && meshDim == 3 )
switch ( axis ) {
- case 0: getNodesFun = & TZoneData::IFaceNodes;
- case 1: getNodesFun = & TZoneData::JFaceNodes;
- case 2: getNodesFun = & TZoneData::KFaceNodes;
+ case 0: getNodesFun = & TZoneData::IFaceNodes; break;
+ case 1: getNodesFun = & TZoneData::JFaceNodes; break;
+ case 2: getNodesFun = & TZoneData::KFaceNodes; break;
}
else if ( elemType == SMDSAbs_Edge && meshDim == 2 )
switch ( axis ) {
- case 0: getNodesFun = & TZoneData::IEdgeNodes;
- case 1: getNodesFun = & TZoneData::JEdgeNodes;
+ case 0: getNodesFun = & TZoneData::IEdgeNodes; break;
+ case 1: getNodesFun = & TZoneData::JEdgeNodes; break;
}
if ( !getNodesFun )
{
PGetNodesFun getNodesFun = 0;
if ( elemType == SMDSAbs_Face )
switch ( axis ) {
- case 0: getNodesFun = & TZoneData::IFaceNodes;
- case 1: getNodesFun = & TZoneData::JFaceNodes;
- case 2: getNodesFun = & TZoneData::KFaceNodes;
+ case 0: getNodesFun = & TZoneData::IFaceNodes; break;
+ case 1: getNodesFun = & TZoneData::JFaceNodes; break;
+ case 2: getNodesFun = & TZoneData::KFaceNodes; break;
}
else if ( elemType == SMDSAbs_Edge && meshDim == 2 )
switch ( axis ) {
- case 0: getNodesFun = & TZoneData::IEdgeNodes;
- case 1: getNodesFun = & TZoneData::JEdgeNodes;
+ case 0: getNodesFun = & TZoneData::IEdgeNodes; break;
+ case 1: getNodesFun = & TZoneData::JEdgeNodes; break;
}
if ( !getNodesFun )
{
PAddElemFun addElemFun = 0;
switch ( meshDim ) {
- case 1: addElemFun = & add_BAR_2;
- case 2: addElemFun = & add_QUAD_4;
- case 3: addElemFun = & add_HEXA_8;
+ case 1: addElemFun = & add_BAR_2; break;
+ case 2: addElemFun = & add_QUAD_4; break;
+ case 3: addElemFun = & add_HEXA_8; break;
}
int elemID = meshInfo.NbElements();
const SMDS_MeshElement* elem = 0;
static int GmfIniFlg=0;
static GmfMshSct *GmfMshTab[ MaxMsh + 1 ];
-// see MeshGems/Docs/meshgems_formats_description.pdf
+/* see MeshGems/Docs/meshgems_formats_description.pdf */
static const char *GmfKwdFmt[ GmfMaxKwd + 1 ][4] =
{ {"Reserved", "", "", ""},
{"MeshVersionFormatted", "", "", "i"},
{
for(i=0;i<kwd->SolSiz;i++)
if(kwd->fmt[i] == 'r')
- fprintf(msh->hdl, "%.15lg ", va_arg(VarArg, double));
+ fprintf(msh->hdl, "%.15lg ", va_arg(VarArg, double)); /* todo: ISO C90 does not support the '%lg' gnu_printf format */
else if(kwd->fmt[i] == 'n') {
nb_repeat = va_arg(VarArg, int);
fprintf(msh->hdl, "%d ", nb_repeat);
if(msh->typ & Asc)
for(j=0;j<kwd->SolSiz;j++)
- fprintf(msh->hdl, "%.15lg ", DblSolTab[j]);
+ fprintf(msh->hdl, "%.15lg ", DblSolTab[j]); /* todo: ISO C90 does not support the '%lg' gnu_printf format */
else
RecBlk(msh, (unsigned char *)DblSolTab, kwd->NmbWrd);
}
{
/* Search which kwd code this string is associated with,
then get its header and save the current position in file (just before the data) */
- // printf("libmesh ScaKwdTab %s\n", str);
+ /* printf("libmesh ScaKwdTab %s\n", str); */
for(KwdCod=1; KwdCod<= GmfMaxKwd; KwdCod++)
if(!strcmp(str, GmfKwdFmt[ KwdCod ][0]))
{
i = kwd->SolSiz = kwd->NmbWrd = 0;
- while(i < strlen(InpFmt))
+ while(i < (int)strlen(InpFmt))
{
chr = InpFmt[ i++ ];
/* Defines */
/*----------------------------------------------------------*/
-#include "SMESH_DriverGMF.hxx"
+#ifdef WIN32
+ #if defined MESHDriverGMF_EXPORTS || defined MeshDriverGMF_EXPORTS
+ #define MESHDriverGMF_EXPORT __declspec( dllexport )
+ #else
+ #define MESHDriverGMF_EXPORT __declspec( dllimport )
+ #endif
+#else
+ #define MESHDriverGMF_EXPORT
+#endif
#define GmfStrSiz 1024
#define GmfMaxTyp 1000
#define GmfFloat 1
#define GmfDouble 2
-// see MeshGems/Docs/meshgems_formats_description.pdf
+/* see MeshGems/Docs/meshgems_formats_description.pdf */
enum GmfKwdCod
{
GmfReserved1, \
else
_dblValues.reserve( nbElems * nbComps );
- return nbElems * nbComps;
+ return nbElems && nbComps;
}
//================================================================================
if ( myAutoDimension && aMeshDimension < 3 )
{
SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator();
- double aBounds[6];
+ double aBounds[6] = {0.,0.,0.,0.,0.,0.};
if(aNodesIter->more()){
const SMDS_MeshNode* aNode = aNodesIter->next();
aBounds[0] = aBounds[1] = aNode->X();
static int MYDEBUG = 0;
static int MYVALUEDEBUG = 0;
#else
-static int MYDEBUG = 0;
-static int MYVALUEDEBUG = 0;
+static int MYDEBUG = 0; // todo: unused in release mode
+static int MYVALUEDEBUG = 0; // todo: unused in release mode
#endif
namespace MED
static int MYDEBUG = 0;
static int MYVALUEDEBUG = 0;
#else
-static int MYDEBUG = 0;
-static int MYVALUEDEBUG = 0;
+static int MYDEBUG = 0; // todo: unused in release mode
+static int MYVALUEDEBUG = 0; // todo: unused in release mode
#endif
namespace MED
TGaussInfo::TLess
::operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const
{
- if(!&theLeft)
+ if(!&theLeft) // todo: address of reference can be assumed always non-null by compiler
return true;
- if(!&theRight)
+ if(!&theRight) // todo: address of reference can be assumed always non-null by compiler
return false;
if(theLeft.myGeom != theRight.myGeom)
switch(aDim){
case 3:
aCoord[2] = myCoord[aDim*theId+2];
+ // fall through
case 2:
aCoord[1] = myCoord[aDim*theId+1];
- case 1:{
+ // fall through
+ case 1:
aCoord[0] = myCoord[aDim*theId];
break;
}
- }
} else {
TFloatVector aVecX = this->GetIndexes(0);
#ifdef _DEBUG_
static int MYDEBUG = 0;
#else
-static int MYDEBUG = 0;
+static int MYDEBUG = 0; // todo: unused in release mode
#endif
int MED::PrefixPrinter::myCounter = 0;
MSG(MYDEBUG,"MED::PrefixPrinter::PrefixPrinter(...)- "<<myCounter);
}
-MED::PrefixPrinter::~PrefixPrinter()
+MED::PrefixPrinter::~PrefixPrinter() noexcept(false)
{
if(myIsActive){
myCounter--;
bool myIsActive;
public:
PrefixPrinter(bool theIsActive = true);
- ~PrefixPrinter();
+ ~PrefixPrinter() noexcept(false);
static std::string GetPrefix();
};
static int MYDEBUG = 0;
static int MYVALUEDEBUG = 0;
#else
-static int MYDEBUG = 0;
-static int MYVALUEDEBUG = 0;
+static int MYDEBUG = 0; // todo: unused in release mode
+static int MYVALUEDEBUG = 0; // todo: unused in release mode
#endif
namespace MED
minor = release = -1;
}
- printf("%d.%d.%d\n", major, minor, release);
+ printf("%d.%d.%d\n", (int)major, (int)minor, (int)release);
return 0;
}
}
-void SMESH_ActorDef::Render(vtkRenderer *ren)
+void SMESH_ActorDef::Render(vtkRenderer* /*ren*/)
{
vtkMTimeType aTime = myTimeStamp->GetMTime();
vtkMTimeType anObjTime = myVisualObj->GetUnstructuredGrid()->GetMTime();
void SMESH_CellLabelActor::ProcessEvents(vtkObject* vtkNotUsed(theObject),
- unsigned long theEvent,
+ unsigned long /*theEvent*/,
void* theClientData,
void* vtkNotUsed(theCallData))
{
aNbCells = 0;
for(; anIter != aValues.end(); anIter++){
const Length2D::Value& aValue = *anIter;
- int aNode[2] = {
+ vtkIdType aNode[2] = {
myVisualObj->GetNodeVTKId(aValue.myPntId[0]),
myVisualObj->GetNodeVTKId(aValue.myPntId[1])
};
aNbCells = 0;
for(; anIter != aValues.end(); anIter++){
const MultiConnection2D::Value& aValue = (*anIter).first;
- int aNode[2] = {
+ vtkIdType aNode[2] = {
myVisualObj->GetNodeVTKId(aValue.myPntId[0]),
myVisualObj->GetNodeVTKId(aValue.myPntId[1])
};
FreeEdges::TBorders::const_iterator anIter = aBorders.begin();
for(; anIter != aBorders.end(); anIter++){
const FreeEdges::Border& aBorder = *anIter;
- int aNode[2] = {
+ vtkIdType aNode[2] = {
myVisualObj->GetNodeVTKId(aBorder.myPntId[0]),
myVisualObj->GetNodeVTKId(aBorder.myPntId[1])
};
void SMESH_NodeLabelActor::ProcessEvents(vtkObject* vtkNotUsed(theObject),
- unsigned long theEvent,
+ unsigned long /*theEvent*/,
void* theClientData,
void* vtkNotUsed(theCallData))
{
vtkStandardNewMacro(SMESH_ScalarBarActor)
-vtkCxxSetObjectMacro(SMESH_ScalarBarActor,LookupTable,vtkScalarsToColors);
-vtkCxxSetObjectMacro(SMESH_ScalarBarActor,LabelTextProperty,vtkTextProperty);
-vtkCxxSetObjectMacro(SMESH_ScalarBarActor,TitleTextProperty,vtkTextProperty);
+vtkCxxSetObjectMacro(SMESH_ScalarBarActor,LookupTable,vtkScalarsToColors)
+vtkCxxSetObjectMacro(SMESH_ScalarBarActor,LabelTextProperty,vtkTextProperty)
+vtkCxxSetObjectMacro(SMESH_ScalarBarActor,TitleTextProperty,vtkTextProperty)
//----------------------------------------------------------------------------
// Instantiate object with 64 maximum colors; 5 labels; %%-#6.3g label
* \brief Return ranges of indices (from,to) of elements having a given value
*/
bool GetIndices( const attr_t theValue, TIndexRanges & theIndices,
- const attr_t* theMinValue = 0, const attr_t* theMaxValue = 0) const
+ const attr_t* /*theMinValue*/ = 0, const attr_t* /*theMaxValue*/ = 0) const
{
bool isFound = false;
#include <iostream>
#endif
-int main (int argc, char ** argv)
+int main ()
{
// To better understand what is going on here, consult bug [SALOME platform 0019911]
#if !defined WIN32 && !defined __APPLE__
SMDS_Ptr( T * pos = (T *) 0, bool isOwner=true ):
std::unique_ptr< T >( pos ), myIsOwner( isOwner ) {}
- SMDS_Ptr( const SMDS_Ptr& from ) : myIsOwner( from.myIsOwner )
+ SMDS_Ptr( const SMDS_Ptr& from ) : std::unique_ptr< T >(), myIsOwner( from.myIsOwner )
{ this->swap( const_cast<SMDS_Ptr&>( from )); }
SMDS_Ptr& operator=( const SMDS_Ptr& from )
GuessSize[VTK_QUADRATIC_HEXAHEDRON] = nbQuadHexa;
GuessSize[VTK_TRIQUADRATIC_HEXAHEDRON] = nbQuadHexa;
GuessSize[VTK_HEXAGONAL_PRISM] = nbHexPrism;
+ (void)GuessSize; // unused in Release mode
_downArray[VTK_LINE] ->allocate(nbLineGuess);
_downArray[VTK_QUADRATIC_EDGE] ->allocate(nbQuadEdgeGuess);
case QUAD_TETRA:
{
switch ( minInd ) {
- case 0: if( maxInd==4 || maxInd==6 || maxInd==7 ) return true;
- case 1: if( maxInd==4 || maxInd==5 || maxInd==8 ) return true;
- case 2: if( maxInd==5 || maxInd==6 || maxInd==9 ) return true;
- case 3: if( maxInd==7 || maxInd==8 || maxInd==9 ) return true;
+ case 0: if( maxInd==4 || maxInd==6 || maxInd==7 ) return true; // fall through
+ case 1: if( maxInd==4 || maxInd==5 || maxInd==8 ) return true; // fall through
+ case 2: if( maxInd==5 || maxInd==6 || maxInd==9 ) return true; // fall through
+ case 3: if( maxInd==7 || maxInd==8 || maxInd==9 ) return true; // fall through
default:;
}
break;
case QUAD_HEXA:
{
switch ( minInd ) {
- case 0: if( maxInd==8 || maxInd==11 || maxInd==16 ) return true;
- case 1: if( maxInd==8 || maxInd==9 || maxInd==17 ) return true;
- case 2: if( maxInd==9 || maxInd==10 || maxInd==18 ) return true;
- case 3: if( maxInd==10 || maxInd==11 || maxInd==19 ) return true;
- case 4: if( maxInd==12 || maxInd==15 || maxInd==16 ) return true;
- case 5: if( maxInd==12 || maxInd==13 || maxInd==17 ) return true;
- case 6: if( maxInd==13 || maxInd==14 || maxInd==18 ) return true;
- case 7: if( maxInd==14 || maxInd==15 || maxInd==19 ) return true;
+ case 0: if( maxInd==8 || maxInd==11 || maxInd==16 ) return true; // fall through
+ case 1: if( maxInd==8 || maxInd==9 || maxInd==17 ) return true; // fall through
+ case 2: if( maxInd==9 || maxInd==10 || maxInd==18 ) return true; // fall through
+ case 3: if( maxInd==10 || maxInd==11 || maxInd==19 ) return true; // fall through
+ case 4: if( maxInd==12 || maxInd==15 || maxInd==16 ) return true; // fall through
+ case 5: if( maxInd==12 || maxInd==13 || maxInd==17 ) return true; // fall through
+ case 6: if( maxInd==13 || maxInd==14 || maxInd==18 ) return true; // fall through
+ case 7: if( maxInd==14 || maxInd==15 || maxInd==19 ) return true; // fall through
default:;
}
break;
case QUAD_PYRAM:
{
switch ( minInd ) {
- case 0: if( maxInd==5 || maxInd==8 || maxInd==9 ) return true;
- case 1: if( maxInd==5 || maxInd==6 || maxInd==10 ) return true;
- case 2: if( maxInd==6 || maxInd==7 || maxInd==11 ) return true;
- case 3: if( maxInd==7 || maxInd==8 || maxInd==12 ) return true;
+ case 0: if( maxInd==5 || maxInd==8 || maxInd==9 ) return true; // fall through
+ case 1: if( maxInd==5 || maxInd==6 || maxInd==10 ) return true; // fall through
+ case 2: if( maxInd==6 || maxInd==7 || maxInd==11 ) return true; // fall through
+ case 3: if( maxInd==7 || maxInd==8 || maxInd==12 ) return true; // fall through
case 4: if( maxInd==9 || maxInd==10 || maxInd==11 || maxInd==12 ) return true;
default:;
}
case QUAD_PENTA:
{
switch ( minInd ) {
- case 0: if( maxInd==6 || maxInd==8 || maxInd==12 ) return true;
- case 1: if( maxInd==6 || maxInd==7 || maxInd==13 ) return true;
- case 2: if( maxInd==7 || maxInd==8 || maxInd==14 ) return true;
- case 3: if( maxInd==9 || maxInd==11 || maxInd==12 ) return true;
- case 4: if( maxInd==9 || maxInd==10 || maxInd==13 ) return true;
- case 5: if( maxInd==10 || maxInd==11 || maxInd==14 ) return true;
+ case 0: if( maxInd==6 || maxInd==8 || maxInd==12 ) return true; // fall through
+ case 1: if( maxInd==6 || maxInd==7 || maxInd==13 ) return true; // fall through
+ case 2: if( maxInd==7 || maxInd==8 || maxInd==14 ) return true; // fall through
+ case 3: if( maxInd==9 || maxInd==11 || maxInd==12 ) return true; // fall through
+ case 4: if( maxInd==9 || maxInd==10 || maxInd==13 ) return true; // fall through
+ case 5: if( maxInd==10 || maxInd==11 || maxInd==14 ) return true; // fall through
default:;
}
break;
OCC_CATCH_SIGNALS;
return BRepLProp::Continuity(C1, C2, u1, u2, tol, angTol);
}
- catch (Standard_Failure) {
+ catch (Standard_Failure&) {
}
return GeomAbs_C0;
}
}
// get a separator from rootDir
- for ( pos = strlen( rootDir )-1; pos >= 0 && sep.empty(); --pos )
- if ( rootDir[pos] == '/' || rootDir[pos] == '\\' )
+ for ( int i = strlen( rootDir )-1; i >= 0 && sep.empty(); --i )
+ if ( rootDir[i] == '/' || rootDir[i] == '\\' )
{
- sep = rootDir[pos];
+ sep = rootDir[i];
break;
}
#ifdef WIN32
}
else {
if ( isUPeriodic )
- newUV.SetX( ElCLib::InPeriod( newUV.X(), u1, u2 ));
+ newUV.SetX( ElCLib::InPeriod( newUV.X(), u1, u2 )); // todo: u may be used unitialized
if ( isVPeriodic )
- newUV.SetY( ElCLib::InPeriod( newUV.Y(), v1, v2 ));
+ newUV.SetY( ElCLib::InPeriod( newUV.Y(), v1, v2 )); // todo: v may be used unitialized
// check new UV
// if ( posType != SMDS_TOP_3DSPACE )
// dist2 = pNode.SquareDistance( surface->Value( newUV.X(), newUV.Y() ));
if ( nbEdges > 0 )
break;
}
+ // fall through
default:
{
for ( int di = -1; di <= 1; di += 2 )
//int& GroupID() const { return const_cast< int& >( myGroupID ); }
ComparableElement( const ComparableElement& theSource ) // move copy
+ : boost::container::flat_set< int >()
{
ComparableElement& src = const_cast< ComparableElement& >( theSource );
(int_set&) (*this ) = boost::move( src );
if ( SMESH_MeshAlgos::FaceNormal( _elems[1], norm ))
avgNorm += norm;
- gp_XYZ bordDir( SMESH_NodeXYZ( _nodes[0] ) - SMESH_NodeXYZ( _nodes[1] ));
+ gp_XYZ bordDir( SMESH_NodeXYZ( _nodes[0] ) - SMESH_NodeXYZ( _nodes[1] )); // todo: compiler complains about zero-size array
norm = bordDir ^ avgNorm;
}
else
try {
return n2.AngleWithRef(n1, vref);
}
- catch ( Standard_Failure ) {
+ catch ( Standard_Failure& ) {
}
return Max( v1.Magnitude(), v2.Magnitude() );
}
const SMDS_MeshNode* n11,
const SMDS_MeshNode* n12,
const int id,
- bool force3d)
+ bool /*force3d*/)
{
SMESHDS_Mesh * meshDS = GetMeshDS();
SMDS_MeshVolume* elem = 0;
/*!
* \brief Dump QLink and QFace
*/
- ostream& operator << (ostream& out, const QLink& l)
+ ostream& operator << (ostream& out, const QLink& l) // todo: unused in release mode
{
out <<"QLink nodes: "
<< l.node1()->GetID() << " - "
<< l.node2()->GetID() << endl;
return out;
}
- ostream& operator << (ostream& out, const QFace& f)
+ ostream& operator << (ostream& out, const QFace& f) // todo: unused in release mode
{
out <<"QFace nodes: "/*<< &f << " "*/;
for ( TIDSortedNodeSet::const_iterator n = f.begin(); n != f.end(); ++n )
#ifdef _DEBUG_
_face = face;
#endif
+ (void)face; // unused in release mode
}
//================================================================================
/*!
*/
//================================================================================
- bool QFace::IsSpoiled(const QLink* bentLink ) const
+ bool QFace::IsSpoiled(const QLink* bentLink ) const // todo: unused
{
// code is valid for convex faces only
gp_XYZ gc(0,0,0);
if ( curvNorm * D2 > 0 )
continue; // convex edge
}
- catch ( Standard_Failure )
+ catch ( Standard_Failure& )
{
continue;
}
if ( concaveU || concaveV )
concaveFaces.push_back( face );
}
- catch ( Standard_Failure )
+ catch ( Standard_Failure& )
{
concaveFaces.push_back( face );
}
try {
gp_Vec x = x01.Normalized() + x12.Normalized();
trsf.SetTransformation( gp_Ax3( gp::Origin(), link1->Normal(), x), gp_Ax3() );
- } catch ( Standard_Failure ) {
+ } catch ( Standard_Failure& ) {
trsf.Invert();
}
move.Transform(trsf);
case '-': // real number
case '+':
case '.':
- isNumber = true;
+ isNumber = true; // fall through
default: // data
isNumber = isNumber || ( *theLineBeg >= '0' && *theLineBeg <= '9' );
if ( isNumber ) {
elem = aMeshDS->AddFace (nodes[0], nodes[1], nodes[2], nodes[3],
nodes[4], nodes[5] ); break;
} // else do not break but create a polygon
+ // fall through
case 8:
if ( !onMeshElements ) {// create a quadratic face
elem = aMeshDS->AddFace (nodes[0], nodes[1], nodes[2], nodes[3],
nodes[4], nodes[5], nodes[6], nodes[7] ); break;
} // else do not break but create a polygon
+ // fall through
default:
elem = aMeshDS->AddPolygonalFace( nodes );
}
loadDependentMeshes();
ComputeSubMeshStateEngine( SUBMESH_LOADED );
//break;
+ // fall through
case CHECK_COMPUTE_STATE:
if ( IsMeshComputed() )
_computeState = COMPUTE_OK;
}
break;
}
+ // fall through
case COMPUTE:
case COMPUTE_SUBMESH:
{
loadDependentMeshes();
ComputeSubMeshStateEngine( SUBMESH_LOADED );
//break;
+ // fall through
case CHECK_COMPUTE_STATE:
if ( IsMeshComputed() )
_computeState = COMPUTE_OK;
//=======================================================================
//function : ChangePolyhedronNodes
//=======================================================================
- inline void ChangePolyhedronNodes (SMDS_Mesh* theMesh,
- SMESH::log_array_var& theSeq,
- CORBA::Long theId)
+ inline void ChangePolyhedronNodes (SMDS_Mesh* /*theMesh*/,
+ SMESH::log_array_var& /*theSeq*/,
+ CORBA::Long /*theId*/)
{
// const SMESH::long_array& anIndexes = theSeq[theId].indexes;
// CORBA::Long iind = 0, aNbElems = theSeq[theId].number;
}
// Verify number of sub-shapes
- if (mySubShapeType == TopAbs_SHAPE);
+ if (mySubShapeType == TopAbs_SHAPE)
return true;
TopTools_IndexedMapOfShape aMap;
OCC_CATCH_SIGNALS;
SMESH::UpdateView();
}
- catch (std::bad_alloc) { // PAL16774 (Crash after display of many groups)
+ catch (std::bad_alloc&) { // PAL16774 (Crash after display of many groups)
SMESH::OnVisuException();
}
catch (...) { // PAL16774 (Crash after display of many groups)
case SMESHOp::OpCreateSubMesh:
if ( warnOnGeomModif() )
break; // action forbiden as geometry modified
-
+ // fall through
case SMESHOp::OpCreateMesh:
case SMESHOp::OpCompute:
case SMESHOp::OpComputeSubMesh:
{
case SMESH::NODE:
typeIds.append( SMDSEntity_Node );
+ break;
case SMESH::EDGE:
typeIds.append( SMDSEntity_Edge );
typeIds.append( SMDSEntity_Quad_Edge );
myTable->SetThreshold(aRow, SMESH::toQStr( grp->GetName() ));
myTable->SetID (aRow, anIO->getEntry() );
}
+ break;
}
default: // get a GEOM object
{
// name : SMESHGUI_FilterLibraryDlg::onEntityTypeChanged
// Purpose : SLOT. Called when entiyt type changed
//=======================================================================
-void SMESHGUI_FilterLibraryDlg::onEntityTypeChanged(const int theType)
+void SMESHGUI_FilterLibraryDlg::onEntityTypeChanged(const int /*theType*/)
{
if (myLibrary->_is_nil())
return;
case SMESH::FT_BelongToMeshGroup: // get a group name and IOR
{
myTable->SetThreshold(aRow, anIO->getName() );
+ break;
}
default: // get a GEOM object
{
{
GEOM::GEOM_Gen_var GetGEOMGen( GEOM::GEOM_Object_ptr go )
{
- GEOM::GEOM_Gen_ptr gen;
+ GEOM::GEOM_Gen_ptr gen = GEOM::GEOM_Gen::_nil();;
if ( !CORBA::is_nil( go ))
gen = go->GetGen();
return gen;
// IDs to groups or vice versa
//=======================================================================
-void SMESHGUI_MergeDlg::onKeepSourceChanged(int isGroup)
+void SMESHGUI_MergeDlg::onKeepSourceChanged(int /*isGroup*/)
{
KeepList->clear();
SelectKeepButton->click();
writer->write( SMESHGUI_AddInfo::tr( "TYPE" ), SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) );
}
int size = group.size();
- if ( size != -1 );
- writer->write( SMESHGUI_AddInfo::tr( "SIZE" ), size );
+ if ( size != -1 )
+ writer->write( SMESHGUI_AddInfo::tr( "SIZE" ), size );
QColor color = group.color();
if ( color.isValid() )
writer->write( SMESHGUI_AddInfo::tr( "COLOR" ), color.name() );
writer->write( SMESHGUI_AddInfo::tr( "TYPE" ), SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) );
}
int size = group.size();
- if ( size != -1 );
+ if ( size != -1 )
writer->write( SMESHGUI_AddInfo::tr( "SIZE" ), size );
QColor color = group.color();
if ( color.isValid() )
return myMesh;
}
-bool SMESHGUI_PreVisualObj::Update( int theIsClear = true )
+bool SMESHGUI_PreVisualObj::Update( int /*theIsClear*/)
{
return false;
}
// function : onDisplaySimulation
// purpose :
//=================================================================================
-void SMESHGUI_PreviewDlg::onDisplaySimulation(bool toDisplayPreview) {
+void SMESHGUI_PreviewDlg::onDisplaySimulation(bool /*toDisplayPreview*/) {
//Empty implementation here
}
// function : onDisplaySimulation
// purpose :
//=================================================================================
-void SMESHGUI_MultiPreviewDlg::onDisplaySimulation( bool toDisplayPreview )
+void SMESHGUI_MultiPreviewDlg::onDisplaySimulation( bool /*toDisplayPreview*/ )
{
//Empty implementation here
}
// function : onAngleTextChange()
// purpose :
//=======================================================================
-void SMESHGUI_RevolutionDlg::onAngleTextChange (const QString& theNewText)
+void SMESHGUI_RevolutionDlg::onAngleTextChange (const QString& /*theNewText*/)
{
bool isNumber;
SpinBox_Angle->text().toDouble( &isNumber );
// name : onDeactivateObject
// purpose :
//=================================================================================
-void SMESHGUI_SelectionOp::onDeactivateObject( int id )
+void SMESHGUI_SelectionOp::onDeactivateObject( int /*id*/ )
{
removeCustomFilters();
}
{
aPRT.node1 = ( aPRT.node1 + size + dn ) % size;
aPRT.node2 = ( aPRT.node2 + size + dn ) % size;
- break;
}
+ break;
case MOVE_LEFT_2:
case MOVE_RIGHT_2:
if (( isClosed ) ||
( 0 <= aPRT.nodeLast+dn && aPRT.nodeLast+dn < size ))
{
aPRT.nodeLast = ( aPRT.nodeLast + size + dn ) % size;
- break;
}
+ break;
default:
return; // impossible to move
}
if (e)
newIndices.Add(e->GetID());
- if (!isEvenOneExists)
- isEvenOneExists = true;
+ if (!isEvenOneExists)
+ isEvenOneExists = true;
}
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
//purpose : SLOT. Called when element type changed.
//=======================================================================
-void SMESHGUI_ShapeByMeshOp::onTypeChanged (int theType)
+void SMESHGUI_ShapeByMeshOp::onTypeChanged (int /*theType*/)
{
setElementID("");
activateSelection();
// name : isValid()
// Purpose : Verify validity of input data
//=======================================================================
-bool SMESHGUI_SingleEditDlg::isValid (const bool theMess) const
+bool SMESHGUI_SingleEditDlg::isValid (const bool /*theMess*/) const
{
int id1, id2;
return getNodeIds(myEdge->text(), id1, id2);
//function : onTextChange()
//purpose :
//=======================================================================
-void SMESHGUI_SingleEditDlg::onTextChange (const QString& theNewText)
+void SMESHGUI_SingleEditDlg::onTextChange (const QString& /*theNewText*/)
{
if (myBusy) return;
BusyLocker lock(myBusy);
}
aStudy->setVisibilityStateForAll(Qtx::HiddenState);
}
+ // fall through
default: {
if (SMESH_Actor *anActor = FindActorByEntry(theWnd,theEntry)) {
switch (theAction) {
int GetSelected(LightApp_SelectionMgr* theMgr,
TColStd_IndexedMapOfInteger& theMap,
- const bool theIsElement)
+ const bool /*theIsElement*/)
{
theMap.Clear();
SALOME_ListIO selected; theMgr->selectedObjects( selected );
++cnt;
bordNodes.resize( cnt + 1 );
- BEdge* beLast;
+ BEdge* beLast = 0;
for ( be = borders[i], cnt = 0;
be && cnt < bordNodes.size()-1;
be = be->myNext, ++cnt )
bordNodes[ cnt ] = be->myBNode1->Node();
beLast = be;
}
- bordNodes.back() = beLast->myBNode2->Node();
+ if ( beLast )
+ bordNodes.back() = beLast->myBNode2->Node();
}
}
{
delete _ebbTree[i]; _ebbTree[i] = NULL;
}
- if ( _nodeSearcher ) delete _nodeSearcher; _nodeSearcher = 0;
+ if ( _nodeSearcher ) delete _nodeSearcher;
+ _nodeSearcher = 0;
}
virtual int FindElementsByPoint(const gp_Pnt& point,
SMDSAbs_ElementType type,
try {
tgtCS = gp_Ax3( xyz[0], OZ, OX );
}
- catch ( Standard_Failure ) {
+ catch ( Standard_Failure& ) {
return badDistance;
}
trsf.SetTransformation( tgtCS );
*/
//====================================================================================
-const bool SMESH_OctreeNode::isInside ( const gp_XYZ& p, const double precision )
+bool SMESH_OctreeNode::isInside ( const gp_XYZ& p, const double precision )
{
if ( precision <= 0.)
return !( getBox()->IsOut(p) );
virtual ~SMESH_OctreeNode () {};
// Tells us if Node is inside the current box with the precision "precision"
- virtual const bool isInside(const gp_XYZ& p, const double precision = 0.);
+ virtual bool isInside(const gp_XYZ& p, const double precision = 0.);
// Return in Result a list of Nodes potentials to be near Node
void AllNodesAround(const SMDS_MeshNode * node,
*/
//================================================================================
- void CutFace::Dump() const
+ void CutFace::Dump() const // todo: unused in release mode
{
std::cout << std::endl << "INI F " << myInitFace->GetID() << std::endl;
for ( size_t i = 0; i < myLinks.size(); ++i )
// add links connecting internal loops with the boundary ones
// find a pair of closest nodes
- const SMDS_MeshNode *closestNode1, *closestNode2;
+ const SMDS_MeshNode *closestNode1 = 0, *closestNode2 = 0;
double minDist = 1e100;
for ( size_t iE = 0; iE < loop.myLinks.size(); ++iE )
{
}
}
- size_t i = myLinks.size();
- myLinks.resize( i + 2 );
- myLinks[ i ].Set( closestNode1, closestNode2 );
- myLinks[ i+1 ].Set( closestNode2, closestNode1 );
+ if ( closestNode1 && closestNode2 ) {
+ size_t i = myLinks.size();
+ myLinks.resize( i + 2 );
+ myLinks[ i ].Set( closestNode1, closestNode2 );
+ myLinks[ i+1 ].Set( closestNode2, closestNode1 );
+ }
}
return true;
if ( face2 )
polySeg.myFace[ iP ] = face2;
else
- ;// ??
+ {} // todo: ??
for ( int i = 0; i < 3; ++i )
{
nodes[ i ] = polySeg.myFace[ iP ]->GetNode( i );
try {
axes = gp_Ax2( p0, normal, v01 );
}
- catch ( Standard_Failure ) {
+ catch ( Standard_Failure& ) {
return false;
}
double factor = 1.0, modulus = normal.Modulus();
void SMESH::doNothing(const char* txt)
{
+ (void)txt; // unused in release mode
MESSAGE( txt << " " << __FILE__ << ": " << __LINE__ );
}
if ( -1 < iGeom && iGeom < nbTypes )
Threshold = SMESH + types[ iGeom ];
#ifdef _DEBUG_
- // is types complete? (compilation failure mains that enum GeometryType changed)
- int _asrt[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 2 : -1 ]; _asrt[0]=_asrt[1];
+ // is types complete? (compilation failure means that enum GeometryType changed)
+ int _asrt[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 2 : -1 ]; _asrt[0]=_asrt[1]; // _asrt[1] may be used uninitialized => replace this with static_assert?
#endif
}
if (Type == "SMESH.FT_EntityType")
Threshold = SMESH + types[ iGeom ];
#ifdef _DEBUG_
// is 'types' complete? (compilation failure mains that enum EntityType changed)
- int _asrt[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 2 : -1 ]; _asrt[0]=_asrt[1];
+ int _asrt[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 2 : -1 ]; _asrt[0]=_asrt[1]; // _asrt[1] may be used uninitialized => replace this with static_assert?
#endif
}
}
std::string BelongToMeshGroup_i::GetGroupID()
{
if ( myGroup->_is_nil() )
- SMESH::SMESH_GroupBase_var( GetGroup() );
+ SMESH::SMESH_GroupBase_var( GetGroup() ); // todo: unnecessary parentheses?
if ( !myGroup->_is_nil() )
myID = SMESH_Gen_i::GetORB()->object_to_string( myGroup );
GEOM::GEOM_Gen_var SMESH_Gen_i::GetGeomEngine( GEOM::GEOM_Object_ptr go )
{
- GEOM::GEOM_Gen_ptr gen;
+ GEOM::GEOM_Gen_ptr gen = GEOM::GEOM_Gen::_nil();;
if ( !CORBA::is_nil( go ))
gen = go->GetGen();
return gen;
hypothesis_i = myHypothesis_i->_this();
int nextId = RegisterObject( hypothesis_i );
if(MYDEBUG) { MESSAGE( "Add hypo to map with id = "<< nextId ); }
- else { nextId = 0; } // avoid "unused variable" warning in release mode
+ else { (void)nextId; } // avoid "unused variable" warning in release mode
}
return hypothesis_i._retn();
}
SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( meshServant->_this() );
int nextId = RegisterObject( mesh );
if(MYDEBUG) { MESSAGE( "Add mesh to map with id = "<< nextId); }
- else { nextId = 0; } // avoid "unused variable" warning in release mode
+ else { (void)nextId; } // avoid "unused variable" warning in release mode
return mesh._retn();
}
catch (SALOME_Exception& S_ex) {
return ok;
}
}
- catch ( std::bad_alloc ) {
+ catch ( std::bad_alloc& ) {
INFOS( "Compute(): lack of memory" );
}
catch ( SALOME_Exception& S_ex ) {
}
}
}
- catch ( std::bad_alloc ) {
+ catch ( std::bad_alloc& ) {
INFOS( "Precompute(): lack of memory" );
}
catch ( SALOME_Exception& S_ex ) {
return nbels._retn();
}
}
- catch ( std::bad_alloc ) {
+ catch ( std::bad_alloc& ) {
INFOS( "Evaluate(): lack of memory" );
}
catch ( SALOME_Exception& S_ex ) {
SMESH_TRY;
std::string aPlatformLibName;
- typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char*);
+ //typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char*);
GenericHypothesisCreator_i* aCreator =
getHypothesisCreator(theAlgoType, theLibName, aPlatformLibName);
if (aCreator)
*/
//=============================================================================
-SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr theSObject,
+SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr /*theSObject*/,
CORBA::Object_ptr theIOR,
const char* theName)
{
SMESH_GroupBase_i::~SMESH_GroupBase_i()
{
- if ( myPreMeshInfo ) delete myPreMeshInfo; myPreMeshInfo = NULL;
+ if ( myPreMeshInfo ) delete myPreMeshInfo;
+ myPreMeshInfo = NULL;
}
//=======================================================================
//!< Delete theNodeSearcher
static void Delete()
{
- if ( theNodeSearcher ) delete theNodeSearcher; theNodeSearcher = 0;
- if ( theElementSearcher ) delete theElementSearcher; theElementSearcher = 0;
+ if ( theNodeSearcher ) { delete theNodeSearcher; } theNodeSearcher = 0;
+ if ( theElementSearcher ) { delete theElementSearcher; } theElementSearcher = 0;
}
typedef map < int, SMESH_subMesh * > TDependsOnMap;
//!< The meshod called by submesh: do my main job
// register CORBA object for persistence
int nextId = _gen_i->RegisterObject( subMesh );
if(MYDEBUG) { MESSAGE( "Add submesh to map with id = "<< nextId); }
- else { nextId = 0; } // avoid "unused variable" warning
+ else { (void)nextId; } // avoid "unused variable" warning
// to track changes of GEOM groups
if ( subMeshId > 0 )
// register CORBA object for persistence
int nextId = _gen_i->RegisterObject( groupVar );
if(MYDEBUG) { MESSAGE( "Add group to map with id = "<< nextId); }
- else { nextId = 0; } // avoid "unused variable" warning in release mode
+ else { (void)nextId; } // avoid "unused variable" warning in release mode
// publishing the groups in the study
GEOM::GEOM_Object_var shapeVar = _gen_i->ShapeToGeomObject( shape );
const char* varIndexPtr = cmdStr.ToCString() + pos;
if ( '0' <= *varIndexPtr && *varIndexPtr <= '9' )
varIndex = atoi( varIndexPtr );
- if ( 0 <= varIndex && varIndex < vars.size() && !vars[varIndex].empty() )
+ if ( 0 <= (int)varIndex && varIndex < vars.size() && !vars[varIndex].empty() )
{
// replace '$VarIndex$' either by var name of var value
const char var0 = vars[varIndex][0];
TPythonDump&
TPythonDump::
- operator<<(SMESH::FilterManager_i* theArg)
+ operator<<(SMESH::FilterManager_i* /*theArg*/)
{
myStream<<"aFilterManager";
return *this;
TPythonDump&
TPythonDump::
- operator<<(SMESH::Measurements_i* theArg)
+ operator<<(SMESH::Measurements_i* /*theArg*/)
{
myStream<<"aMeasurements";
return *this;
}
- TPythonDump& TPythonDump:: operator<<(SMESH_Gen_i* theArg)
+ TPythonDump& TPythonDump:: operator<<(SMESH_Gen_i* /*theArg*/)
{
myStream << SMESHGenName(); return *this;
}
{
#ifdef _DEBUG_
std::cout << "Exception in SMESH_Gen_i::DumpPython(): " << text << std::endl;
+#else
+ (void)text; // todo: unused in release mode
#endif
}
double a[3];
bool isDone[3];
double size = -1., maxLinkLen;
- int jLongest;
+ int jLongest = 0;
//int nbLinks = 0;
for ( int i = 1; i <= myPolyTrias->Upper(); ++i )
}
#ifdef _DEBUG_
_cellID = cellID;
+#else
+ (void)cellID; // unused in release mode
#endif
}
case 3: // at a corner
{
_Node& node = _hexNodes[ subEntity - SMESH_Block::ID_FirstV ];
- if ( node.Node() > 0 )
+ if ( node.Node() != 0 )
{
if ( node._intPoint )
node._intPoint->Add( _eIntPoints[ iP ]->_faceIDs, _eIntPoints[ iP ]->_node );
continue;
// perform intersection
- E_IntersectPoint* eip, *vip;
+ E_IntersectPoint* eip, *vip = 0; // todo: vip must be explicitly initialized to avoid warning (see below)
for ( int iDirZ = 0; iDirZ < 3; ++iDirZ )
{
GridPlanes& planes = pln[ iDirZ ];
vip = _grid->Add( ip );
if ( isInternal && !sameV )
vip->_faceIDs.push_back( _grid->PseudoIntExtFaceID() );
- if ( !addIntersection( vip, hexes, ijk, d000 ) && !sameV )
+ if ( !addIntersection( vip, hexes, ijk, d000 ) && !sameV ) // todo: vip must be explicitly initialized to avoid warning (see above)
_grid->Remove( vip );
ip._shapeID = edgeID;
}
cout << "BUG: not shared link. IKJ = ( "<< _i << " " << _j << " " << _k << " )" << endl
<< "n1 (" << p1.X() << ", "<< p1.Y() << ", "<< p1.Z() << " )" << endl
<< "n2 (" << p2.X() << ", "<< p2.Y() << ", "<< p2.Z() << " )" << endl;
+#else
+ (void)link; // unused in release mode
#endif
return false;
}
if ( allQuads )
{
// set side nodes as this: bottom, top, top, ...
- int iTop, iBot; // side indices
+ int iTop = 0, iBot = 0; // side indices
for ( int iS = 0; iS < 6; ++iS )
{
if ( vol->_names[ iS ] == SMESH_Block::ID_Fxy0 )
const int eventType,
SMESH_subMesh* subMeshOfSolid,
SMESH_subMeshEventListenerData* /*data*/,
- const SMESH_Hypothesis* hyp = 0)
+ const SMESH_Hypothesis* /*hyp*/ = 0)
{
if ( eventType == SMESH_subMesh::COMPUTE_EVENT )
{
if ( fIt->next()->NbNodes() % 4 > 0 )
return error("Non-quadrangular mesh faces are not allowed on sides of a composite block");
- bool isProxy, isTmpElem;
+ bool isProxy = false, isTmpElem = false;
if ( faceSubMesh && faceSubMesh->NbElements() > 0 )
{
isProxy = dynamic_cast< const SMESH_ProxyMesh::SubMesh* >( faceSubMesh );
n = d1u.Crossed( d1v );
return true;
}
- catch (Standard_Failure) {
+ catch (Standard_Failure&) {
return false;
}
}
try {
OCC_CATCH_SIGNALS;
f = pow( 10., f );
- } catch(Standard_Failure) {
+ } catch(Standard_Failure&) {
f = 0.0;
ok = false;
}
OCC_CATCH_SIGNALS;
myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( ( Standard_CString )str );
- } catch(Standard_Failure) {
+ } catch(Standard_Failure&) {
ok = false;
}
try {
OCC_CATCH_SIGNALS;
f = myExpr->Expression()->Evaluate( myVars, myValues );
- } catch(Standard_Failure) {
+ } catch(Standard_Failure&) {
f = 0.0;
ok = false;
}
( *static_cast<math_Function*>( const_cast<FunctionExpr*> (this) ), a, b, 20 );
if( _int.IsDone() )
res = _int.Value();
- } catch(Standard_Failure) {
+ } catch(Standard_Failure&) {
res = 0.0;
MESSAGE( "Exception in integral calculating" );
}
MESSAGE_ADD ( "\tF: "<<myFirst[i]<< " L: "<< myLast[i] );
MESSAGE_END ( "\tnormPar: "<<myNormPar[i]<<endl );
}
+#else
+ (void)msg; // unused in release mode
#endif
}
*/
//================================================================================
-bool StdMeshers_FixedPoints1D::SetParametersByDefaults(const TDefaults& dflts,
+bool StdMeshers_FixedPoints1D::SetParametersByDefaults(const TDefaults& /*dflts*/,
const SMESH_Mesh* /*mesh*/)
{
_nbsegs.reserve( 1 );
case TopAbs_EDGE:
if ( SMESH_Algo::isDegenerated( TopoDS::Edge( sm->GetSubShape() )))
continue;
+ // fall through
case TopAbs_FACE:
_subM.insert( sm );
if ( !sm->IsEmpty() )
OCC_CATCH_SIGNALS;
val = pow( 10.0, val );
}
- catch(Standard_Failure) {
+ catch(Standard_Failure&) {
throw SALOME_Exception( LOCALIZED( "invalid value"));
return;
}
OCC_CATCH_SIGNALS;
myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( str.ToCString() );
- } catch(Standard_Failure) {
+ } catch(Standard_Failure&) {
parsed_ok = false;
}
while(itf->more()) {
const SMDS_MeshElement* pE0 = itf->next();
aElementType = pE0->GetType();
- if (!aElementType==SMDSAbs_Face) {
+ if (aElementType!=SMDSAbs_Face) {
continue;
}
aNbNodes = pE0->NbNodes();
cout << "mesh.AddNode( " << p[i].X() << ", "<< p[i].Y() << ", "<< p[i].Z() << ") # " << i <<" " ;
SMESH_Block::DumpShapeID( i, cout ) << endl;
}
+#else
+ (void)p; // unused in release mode
#endif
}
} // namespace
*/
//================================================================================
-bool StdMeshers_Prism_3D::setFaceAndEdgesXYZ( const int faceID, const gp_XYZ& params, int z )
+bool StdMeshers_Prism_3D::setFaceAndEdgesXYZ( const int faceID, const gp_XYZ& params, int /*z*/ )
{
// find base and top edges of the face
enum { BASE = 0, TOP, LEFT, RIGHT };
<< n << ", " << n+1 << ", "
<< n+nb+2 << ", " << n+nb+1 << "]) " << endl;
}
-
+#else
+ (void)face; // unused in release mode
+ (void)nb; // unused in release mode
#endif
}
TVerticalEdgeAdaptor* vSide1 = (TVerticalEdgeAdaptor*) VertiCurve(1);
cout << "Verti side 1: "; vSide1->dumpNodes(nbNodes); cout << endl;
delete hSize0; delete hSize1; delete vSide0; delete vSide1;
+#else
+ (void)nbNodes; // unused in release mode
#endif
}
cout << (*myNodeColumn)[i]->GetID() << " ";
if ( nbNodes < (int) myNodeColumn->size() )
cout << myNodeColumn->back()->GetID();
+#else
+ (void)nbNodes; // unused in release mode
#endif
}
side->GetColumns( u , col, col2 );
if ( n != col->second[ i ] )
cout << col->second[ i ]->GetID();
+#else
+ (void)nbNodes; // unused in release mode
#endif
}
return max(theMeshDS[0]->ShapeToIndex(S), theMeshDS[1]->ShapeToIndex(S) );
return long(S.TShape().operator->());
}
- void show_shape( TopoDS_Shape v, const char* msg ) // debug
+ void show_shape( TopoDS_Shape v, const char* msg ) // debug // todo: unused in release mode
{
if ( v.IsNull() ) cout << msg << " NULL SHAPE" << endl;
else if (v.ShapeType() == TopAbs_VERTEX) {
else {
cout << msg << " "; TopAbs::Print((v).ShapeType(),cout) <<" "<<shapeIndex((v))<<endl;}
}
- void show_list( const char* msg, const list< TopoDS_Edge >& l ) // debug
+ void show_list( const char* msg, const list< TopoDS_Edge >& l ) // debug // todo: unused in release mode
{
cout << msg << " ";
list< TopoDS_Edge >::const_iterator e = l.begin();
show_shape( TopoDS_Shape(), "avoid warning: show_shape() defined but not used");
show_list( "avoid warning: show_list() defined but not used", list< TopoDS_Edge >() );
}
+#else
+ (void)shape; // unused in release mode
#endif
return false;
}
// mapper changed, no more "mapper puts on a seam edge nodes from 2 edges"
if ( isSeam && ! getBoundaryNodes ( sm, tgtFace, u2nodesOnSeam, seamNodes ))
- ;//RETURN_BAD_RESULT("getBoundaryNodes() failed");
+ {
+ //RETURN_BAD_RESULT("getBoundaryNodes() failed");
+ }
SMDS_NodeIteratorPtr nIt = smDS->GetNodes();
while ( nIt->more() )
clearPropagationChain( subMesh );
}
// return; -- hyp is modified any way
+ // fall through
default:
//case SMESH_subMesh::MODIF_HYP: // hyp modif
// clear mesh in a chain
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
-bool StdMeshers_QuadrangleParams::SetParametersByDefaults(const TDefaults& dflts,
+bool StdMeshers_QuadrangleParams::SetParametersByDefaults(const TDefaults& /*dflts*/,
const SMESH_Mesh* /*mesh*/)
{
return true;
{
// find the center and a point most distant from it
- double maxDist = 0, normPar;
+ double maxDist = 0, normPar = 0;
gp_XY uv1, uv2;
for ( int i = 0; i < 32; ++i )
{
*/
//=============================================================================
-void StdMeshers_Regular_1D::SubmeshRestored(SMESH_subMesh* subMesh)
+void StdMeshers_Regular_1D::SubmeshRestored(SMESH_subMesh* /*subMesh*/)
{
}
} // loop on data._edgesOnShape
if ( !is1stBlocked )
+ {
dumpFunctionEnd();
+ }
if ( closestFace && le )
{
eos._offsetSurf = new ShapeAnalysis_Surface( surf );
}
- catch ( Standard_Failure )
+ catch ( Standard_Failure& )
{
}
}
<< "_InfStep" << infStep << "_" << smooStep );
for ( ; i < eos._edges.size(); ++i )
{
- if ( eos._edges[i]->Is( _LayerEdge::MARKED ))
+ if ( eos._edges[i]->Is( _LayerEdge::MARKED )) {
dumpMove( eos._edges[i]->_nodes.back() );
+ }
}
dumpFunctionEnd();
}
_LayerEdge* edge = e2neIt->first;
_LayerEdge& newEdge = e2neIt->second;
_EdgesOnShape* eos = data.GetShapeEdges( edge );
- if ( edge->Is( _LayerEdge::BLOCKED && newEdge._maxLen > edge->_len ))
+ if ( edge->Is( _LayerEdge::BLOCKED ) && newEdge._maxLen > edge->_len )
continue;
// Check if a new _normal is OK:
else
norm += cross;
}
- catch (Standard_Failure) { // if |cross| == 0.
+ catch (Standard_Failure&) { // if |cross| == 0.
}
}
gp_XYZ vec = newPos - pN;
* \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined
*/
- virtual bool SetParametersByDefaults(const TDefaults& /*dflts*/, const SMESH_Mesh* theMesh=0)
+ virtual bool SetParametersByDefaults(const TDefaults& /*dflts*/, const SMESH_Mesh* /*theMesh*/=0)
{ return false; }
static const char* GetHypType() { return "ViscousLayers"; }
try {
OCC_CATCH_SIGNALS;
replot();
- } catch(Standard_Failure) {
+ } catch(Standard_Failure&) {
}
}
OCC_CATCH_SIGNALS;
myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( ( Standard_CString ) str.toLatin1().data() );
- } catch(Standard_Failure) {
+ } catch(Standard_Failure&) {
parsed_ok = false;
}
try {
OCC_CATCH_SIGNALS;
res = myExpr->Expression()->Evaluate( myVars, myValues );
- } catch(Standard_Failure) {
+ } catch(Standard_Failure&) {
ok = false;
res = 0.0;
}
//
if(v < -7) v = -7.0;
v = pow( 10.0, v );
- } catch(Standard_Failure) {
+ } catch(Standard_Failure&) {
v = 0.0;
ok = false;
}
item->setData( Qt::UserRole, -1 );
}
else
- for ( size_t i = 0; i < myChains.size(); ++i )
+ for ( int i = 0; i < (int)myChains.size(); ++i )
{
QString text = tr( "CHAIN_NUM_NB_EDGES" ).arg( i+1 ).arg( myChains[i].size() );
item = new QListWidgetItem( text, myListWidget );
- item->setData( Qt::UserRole, (int) i );
+ item->setData( Qt::UserRole, i );
}
}
else
std::vector< int > * chain = 0;
if ( QListWidgetItem * item = myListWidget->currentItem() )
{
- size_t i = (size_t) item->data( Qt::UserRole ).toInt();
- if ( 0 <= i && i < myChains.size() )
+ int i = item->data( Qt::UserRole ).toInt();
+ if ( 0 <= i && i < (int)myChains.size() )
chain = & myChains[i];
}
return chain;
*/
//================================================================================
-std::string StdMeshers_Deflection1D_i::getMethodOfParameter(const int paramIndex,
+std::string StdMeshers_Deflection1D_i::getMethodOfParameter(const int /*paramIndex*/,
int /*nbVars*/) const
{
return "SetDeflection";
*/
//=============================================================================
-bool StdMeshers_Hexa_3D_i::IsApplicable( const TopoDS_Shape &S, bool toCheckAll, int algoDim )
+bool StdMeshers_Hexa_3D_i::IsApplicable( const TopoDS_Shape &S, bool toCheckAll, int /*algoDim*/ )
{
return ::StdMeshers_Hexa_3D::IsApplicable( S, toCheckAll );
}
//================================================================================
bool StdMeshers_QuadFromMedialAxis_1D2D_i::IsApplicable( const TopoDS_Shape &S,
- bool toCheckAll, int algoDim )
+ bool toCheckAll, int /*algoDim*/ )
{
return ::StdMeshers_QuadFromMedialAxis_1D2D::IsApplicable( S, toCheckAll );
}
//-----------------------------------------------------------------------------
-bool StdMeshers_RadialQuadrangle_1D2D_i::IsApplicable( const TopoDS_Shape &S, bool toCheckAll, int algoDim )
+bool StdMeshers_RadialQuadrangle_1D2D_i::IsApplicable( const TopoDS_Shape &S, bool toCheckAll, int /*algoDim*/ )
{
return ::StdMeshers_RadialQuadrangle_1D2D::IsApplicable( S, toCheckAll );
}
std::string MESHCUT::floatEnsight(float x)
{
- char buf[12];
+ char buf[20];
string s;
if (x < 0.0)
sprintf(buf, "%1.5E", x);
LOG("resource["<<i<<"] = "<<aResourceName);
resourceDefinition = _resourcesManager->GetResourceDefinition(aResourceName);
LOG("protocol["<<i<<"] = "<<resourceDefinition->protocol);
+ (void)resourceDefinition; // unused in release mode
}
}