mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-14 14:01:34 +05:00
fight warnings, c++17. additional corrections++
This commit is contained in:
parent
9b08e00e6a
commit
242fecaab1
@ -123,15 +123,15 @@ std::string Driver_Mesh::fixUTF8(const std::string & str )
|
||||
|
||||
// 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] = '?';
|
||||
|
@ -134,12 +134,12 @@ namespace
|
||||
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;
|
||||
@ -187,7 +187,7 @@ namespace
|
||||
}
|
||||
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];
|
||||
@ -207,7 +207,7 @@ namespace
|
||||
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 ); }
|
||||
};
|
||||
|
||||
@ -297,7 +297,7 @@ namespace
|
||||
}
|
||||
|
||||
// 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 )
|
||||
@ -1073,14 +1073,14 @@ Driver_Mesh::Status DriverCGNS_Read::Perform()
|
||||
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 )
|
||||
{
|
||||
@ -1103,14 +1103,14 @@ Driver_Mesh::Status DriverCGNS_Read::Perform()
|
||||
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 )
|
||||
{
|
||||
@ -1129,9 +1129,9 @@ Driver_Mesh::Status DriverCGNS_Read::Perform()
|
||||
|
||||
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;
|
||||
|
@ -78,7 +78,7 @@ typedef struct
|
||||
|
||||
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"},
|
||||
@ -875,7 +875,7 @@ void GmfSetLin(int MshIdx, int KwdCod, ...)
|
||||
{
|
||||
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);
|
||||
@ -936,7 +936,7 @@ void GmfSetLin(int MshIdx, int KwdCod, ...)
|
||||
|
||||
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);
|
||||
}
|
||||
@ -1064,7 +1064,7 @@ static int ScaKwdTab(GmfMshSct *msh)
|
||||
{
|
||||
/* 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]))
|
||||
{
|
||||
@ -1191,7 +1191,7 @@ static void ExpFmt(GmfMshSct *msh, int KwdCod)
|
||||
|
||||
i = kwd->SolSiz = kwd->NmbWrd = 0;
|
||||
|
||||
while(i < strlen(InpFmt))
|
||||
while(i < (int)strlen(InpFmt))
|
||||
{
|
||||
chr = InpFmt[ i++ ];
|
||||
|
||||
|
@ -18,7 +18,15 @@
|
||||
/* 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
|
||||
@ -33,7 +41,7 @@
|
||||
#define GmfFloat 1
|
||||
#define GmfDouble 2
|
||||
|
||||
// see MeshGems/Docs/meshgems_formats_description.pdf
|
||||
/* see MeshGems/Docs/meshgems_formats_description.pdf */
|
||||
enum GmfKwdCod
|
||||
{
|
||||
GmfReserved1, \
|
||||
|
@ -156,7 +156,7 @@ bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh,
|
||||
else
|
||||
_dblValues.reserve( nbElems * nbComps );
|
||||
|
||||
return nbElems * nbComps;
|
||||
return nbElems && nbComps;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
|
@ -379,7 +379,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
||||
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();
|
||||
|
@ -28,8 +28,8 @@
|
||||
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
|
||||
|
@ -27,8 +27,8 @@
|
||||
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
|
||||
|
@ -352,10 +352,10 @@ 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)
|
||||
@ -644,13 +644,14 @@ namespace MED
|
||||
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);
|
||||
|
@ -26,7 +26,7 @@
|
||||
#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;
|
||||
@ -39,7 +39,7 @@ MED::PrefixPrinter::PrefixPrinter(bool theIsActive):
|
||||
MSG(MYDEBUG,"MED::PrefixPrinter::PrefixPrinter(...)- "<<myCounter);
|
||||
}
|
||||
|
||||
MED::PrefixPrinter::~PrefixPrinter()
|
||||
MED::PrefixPrinter::~PrefixPrinter() noexcept(false)
|
||||
{
|
||||
if(myIsActive){
|
||||
myCounter--;
|
||||
|
@ -39,7 +39,7 @@ namespace MED
|
||||
bool myIsActive;
|
||||
public:
|
||||
PrefixPrinter(bool theIsActive = true);
|
||||
~PrefixPrinter();
|
||||
~PrefixPrinter() noexcept(false);
|
||||
|
||||
static std::string GetPrefix();
|
||||
};
|
||||
|
@ -38,8 +38,8 @@
|
||||
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
|
||||
|
@ -43,6 +43,6 @@ int main (int argc, char **argv)
|
||||
minor = release = -1;
|
||||
}
|
||||
|
||||
printf("%d.%d.%d\n", major, minor, release);
|
||||
printf("%d.%d.%d\n", (int)major, (int)minor, (int)release);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1914,7 +1914,7 @@ int SMESH_ActorDef::RenderTranslucentGeometry(vtkViewport *vp)
|
||||
}
|
||||
|
||||
|
||||
void SMESH_ActorDef::Render(vtkRenderer *ren)
|
||||
void SMESH_ActorDef::Render(vtkRenderer* /*ren*/)
|
||||
{
|
||||
vtkMTimeType aTime = myTimeStamp->GetMTime();
|
||||
vtkMTimeType anObjTime = myVisualObj->GetUnstructuredGrid()->GetMTime();
|
||||
|
@ -205,7 +205,7 @@ void SMESH_CellLabelActor::UpdateLabels()
|
||||
|
||||
|
||||
void SMESH_CellLabelActor::ProcessEvents(vtkObject* vtkNotUsed(theObject),
|
||||
unsigned long theEvent,
|
||||
unsigned long /*theEvent*/,
|
||||
void* theClientData,
|
||||
void* vtkNotUsed(theCallData))
|
||||
{
|
||||
|
@ -410,7 +410,7 @@ SMESH_DeviceActor
|
||||
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])
|
||||
};
|
||||
@ -475,7 +475,7 @@ SMESH_DeviceActor
|
||||
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])
|
||||
};
|
||||
@ -573,7 +573,7 @@ SMESH_DeviceActor
|
||||
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])
|
||||
};
|
||||
|
@ -195,7 +195,7 @@ void SMESH_NodeLabelActor::UpdateLabels()
|
||||
|
||||
|
||||
void SMESH_NodeLabelActor::ProcessEvents(vtkObject* vtkNotUsed(theObject),
|
||||
unsigned long theEvent,
|
||||
unsigned long /*theEvent*/,
|
||||
void* theClientData,
|
||||
void* vtkNotUsed(theCallData))
|
||||
{
|
||||
|
@ -43,9 +43,9 @@
|
||||
|
||||
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
|
||||
|
@ -231,7 +231,7 @@ struct _RangeSet
|
||||
* \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;
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
#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__
|
||||
|
@ -62,7 +62,7 @@ class SMDS_Ptr : public std::unique_ptr< T >
|
||||
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 )
|
||||
|
@ -482,6 +482,7 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool /*withEdges*/)
|
||||
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);
|
||||
|
@ -1488,10 +1488,10 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index,
|
||||
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;
|
||||
@ -1499,14 +1499,14 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index,
|
||||
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;
|
||||
@ -1514,10 +1514,10 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index,
|
||||
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:;
|
||||
}
|
||||
@ -1526,12 +1526,12 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index,
|
||||
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;
|
||||
|
@ -518,7 +518,7 @@ GeomAbs_Shape SMESH_Algo::Continuity(const TopoDS_Edge& theE1,
|
||||
OCC_CATCH_SIGNALS;
|
||||
return BRepLProp::Continuity(C1, C2, u1, u2, tol, angTol);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
}
|
||||
return GeomAbs_C0;
|
||||
}
|
||||
|
@ -1015,10 +1015,10 @@ std::vector< std::string > SMESH_Gen::GetPluginXMLPaths()
|
||||
}
|
||||
|
||||
// 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
|
||||
|
@ -3843,9 +3843,9 @@ void SMESH_MeshEditor::Smooth (TIDSortedElemSet & theElems,
|
||||
}
|
||||
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() ));
|
||||
@ -6056,6 +6056,7 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet theElements[2],
|
||||
if ( nbEdges > 0 )
|
||||
break;
|
||||
}
|
||||
// fall through
|
||||
default:
|
||||
{
|
||||
for ( int di = -1; di <= 1; di += 2 )
|
||||
@ -7446,6 +7447,7 @@ public:
|
||||
//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 );
|
||||
@ -10184,7 +10186,7 @@ namespace // automatically find theAffectedElems for DoubleNodes()
|
||||
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
|
||||
@ -11031,7 +11033,7 @@ double SMESH_MeshEditor::OrientedAngle(const gp_Pnt& p0, const gp_Pnt& p1, const
|
||||
try {
|
||||
return n2.AngleWithRef(n1, vref);
|
||||
}
|
||||
catch ( Standard_Failure ) {
|
||||
catch ( Standard_Failure& ) {
|
||||
}
|
||||
return Max( v1.Magnitude(), v2.Magnitude() );
|
||||
}
|
||||
|
@ -2421,7 +2421,7 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
|
||||
const SMDS_MeshNode* n11,
|
||||
const SMDS_MeshNode* n12,
|
||||
const int id,
|
||||
bool force3d)
|
||||
bool /*force3d*/)
|
||||
{
|
||||
SMESHDS_Mesh * meshDS = GetMeshDS();
|
||||
SMDS_MeshVolume* elem = 0;
|
||||
@ -3769,7 +3769,7 @@ namespace { // Structures used by FixQuadraticElements()
|
||||
/*!
|
||||
* \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() << " - "
|
||||
@ -3777,7 +3777,7 @@ namespace { // Structures used by FixQuadraticElements()
|
||||
<< 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 )
|
||||
@ -3820,6 +3820,7 @@ namespace { // Structures used by FixQuadraticElements()
|
||||
#ifdef _DEBUG_
|
||||
_face = face;
|
||||
#endif
|
||||
(void)face; // unused in release mode
|
||||
}
|
||||
//================================================================================
|
||||
/*!
|
||||
@ -4130,7 +4131,7 @@ namespace { // Structures used by FixQuadraticElements()
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
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);
|
||||
@ -4613,7 +4614,7 @@ namespace { // Structures used by FixQuadraticElements()
|
||||
if ( curvNorm * D2 > 0 )
|
||||
continue; // convex edge
|
||||
}
|
||||
catch ( Standard_Failure )
|
||||
catch ( Standard_Failure& )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -4728,7 +4729,7 @@ namespace { // Structures used by FixQuadraticElements()
|
||||
if ( concaveU || concaveV )
|
||||
concaveFaces.push_back( face );
|
||||
}
|
||||
catch ( Standard_Failure )
|
||||
catch ( Standard_Failure& )
|
||||
{
|
||||
concaveFaces.push_back( face );
|
||||
}
|
||||
@ -5260,7 +5261,7 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError,
|
||||
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);
|
||||
|
@ -177,7 +177,7 @@ int readLine (list <const char*> & theFields,
|
||||
case '-': // real number
|
||||
case '+':
|
||||
case '.':
|
||||
isNumber = true;
|
||||
isNumber = true; // fall through
|
||||
default: // data
|
||||
isNumber = isNumber || ( *theLineBeg >= '0' && *theLineBeg <= '9' );
|
||||
if ( isNumber ) {
|
||||
@ -4289,11 +4289,13 @@ void SMESH_Pattern::createElements(SMESH_Mesh* theMes
|
||||
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 );
|
||||
}
|
||||
|
@ -1408,6 +1408,7 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
|
||||
loadDependentMeshes();
|
||||
ComputeSubMeshStateEngine( SUBMESH_LOADED );
|
||||
//break;
|
||||
// fall through
|
||||
case CHECK_COMPUTE_STATE:
|
||||
if ( IsMeshComputed() )
|
||||
_computeState = COMPUTE_OK;
|
||||
@ -1459,6 +1460,7 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
|
||||
}
|
||||
break;
|
||||
}
|
||||
// fall through
|
||||
case COMPUTE:
|
||||
case COMPUTE_SUBMESH:
|
||||
{
|
||||
@ -1722,6 +1724,7 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
|
||||
loadDependentMeshes();
|
||||
ComputeSubMeshStateEngine( SUBMESH_LOADED );
|
||||
//break;
|
||||
// fall through
|
||||
case CHECK_COMPUTE_STATE:
|
||||
if ( IsMeshComputed() )
|
||||
_computeState = COMPUTE_OK;
|
||||
|
@ -745,9 +745,9 @@ namespace
|
||||
//=======================================================================
|
||||
//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;
|
||||
|
@ -135,7 +135,7 @@ bool SMESH_NumberFilter::isOk (const SUIT_DataOwner* theDataOwner) const
|
||||
}
|
||||
|
||||
// Verify number of sub-shapes
|
||||
if (mySubShapeType == TopAbs_SHAPE);
|
||||
if (mySubShapeType == TopAbs_SHAPE)
|
||||
return true;
|
||||
|
||||
TopTools_IndexedMapOfShape aMap;
|
||||
|
@ -2759,7 +2759,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
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)
|
||||
@ -2864,7 +2864,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
case SMESHOp::OpCreateSubMesh:
|
||||
if ( warnOnGeomModif() )
|
||||
break; // action forbiden as geometry modified
|
||||
|
||||
// fall through
|
||||
case SMESHOp::OpCreateMesh:
|
||||
case SMESHOp::OpCompute:
|
||||
case SMESHOp::OpComputeSubMesh:
|
||||
|
@ -1732,6 +1732,7 @@ static QList<int> entityTypes( const int theType )
|
||||
{
|
||||
case SMESH::NODE:
|
||||
typeIds.append( SMDSEntity_Node );
|
||||
break;
|
||||
case SMESH::EDGE:
|
||||
typeIds.append( SMDSEntity_Edge );
|
||||
typeIds.append( SMDSEntity_Quad_Edge );
|
||||
@ -3816,6 +3817,7 @@ void SMESHGUI_FilterDlg::onSelectionDone()
|
||||
myTable->SetThreshold(aRow, SMESH::toQStr( grp->GetName() ));
|
||||
myTable->SetID (aRow, anIO->getEntry() );
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: // get a GEOM object
|
||||
{
|
||||
|
@ -1152,7 +1152,7 @@ const SMESHGUI_FilterTable* SMESHGUI_FilterLibraryDlg::GetTable() const
|
||||
// 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;
|
||||
@ -1244,6 +1244,7 @@ void SMESHGUI_FilterLibraryDlg::onSelectionDone()
|
||||
case SMESH::FT_BelongToMeshGroup: // get a group name and IOR
|
||||
{
|
||||
myTable->SetThreshold(aRow, anIO->getName() );
|
||||
break;
|
||||
}
|
||||
default: // get a GEOM object
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ namespace SMESH
|
||||
{
|
||||
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;
|
||||
|
@ -1621,7 +1621,7 @@ void SMESHGUI_MergeDlg::onSelectKeep()
|
||||
// IDs to groups or vice versa
|
||||
//=======================================================================
|
||||
|
||||
void SMESHGUI_MergeDlg::onKeepSourceChanged(int isGroup)
|
||||
void SMESHGUI_MergeDlg::onKeepSourceChanged(int /*isGroup*/)
|
||||
{
|
||||
KeepList->clear();
|
||||
SelectKeepButton->click();
|
||||
|
@ -1804,8 +1804,8 @@ void SMESHGUI_ElemInfo::writeInfo( InfoWriter* writer, const QList<uint>& ids )
|
||||
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() );
|
||||
@ -1935,7 +1935,7 @@ void SMESHGUI_ElemInfo::writeInfo( InfoWriter* writer, const QList<uint>& ids )
|
||||
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() )
|
||||
|
@ -35,7 +35,7 @@ SMDS_Mesh* SMESHGUI_PreVisualObj::GetMesh() const
|
||||
return myMesh;
|
||||
}
|
||||
|
||||
bool SMESHGUI_PreVisualObj::Update( int theIsClear = true )
|
||||
bool SMESHGUI_PreVisualObj::Update( int /*theIsClear*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ void SMESHGUI_PreviewDlg::toDisplaySimulation() {
|
||||
// function : onDisplaySimulation
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_PreviewDlg::onDisplaySimulation(bool toDisplayPreview) {
|
||||
void SMESHGUI_PreviewDlg::onDisplaySimulation(bool /*toDisplayPreview*/) {
|
||||
//Empty implementation here
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ void SMESHGUI_MultiPreviewDlg::toDisplaySimulation()
|
||||
// function : onDisplaySimulation
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_MultiPreviewDlg::onDisplaySimulation( bool toDisplayPreview )
|
||||
void SMESHGUI_MultiPreviewDlg::onDisplaySimulation( bool /*toDisplayPreview*/ )
|
||||
{
|
||||
//Empty implementation here
|
||||
}
|
||||
|
@ -573,7 +573,7 @@ void SMESHGUI_RevolutionDlg::ClickOnHelp()
|
||||
// function : onAngleTextChange()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void SMESHGUI_RevolutionDlg::onAngleTextChange (const QString& theNewText)
|
||||
void SMESHGUI_RevolutionDlg::onAngleTextChange (const QString& /*theNewText*/)
|
||||
{
|
||||
bool isNumber;
|
||||
SpinBox_Angle->text().toDouble( &isNumber );
|
||||
|
@ -195,7 +195,7 @@ void SMESHGUI_SelectionOp::onActivateObject( int id )
|
||||
// name : onDeactivateObject
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_SelectionOp::onDeactivateObject( int id )
|
||||
void SMESHGUI_SelectionOp::onDeactivateObject( int /*id*/ )
|
||||
{
|
||||
removeCustomFilters();
|
||||
}
|
||||
|
@ -1243,16 +1243,16 @@ void SMESHGUI_SewingDlg::onMoveBorderEnd(int button)
|
||||
{
|
||||
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
|
||||
}
|
||||
@ -1584,8 +1584,8 @@ void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText)
|
||||
if (e)
|
||||
newIndices.Add(e->GetID());
|
||||
|
||||
if (!isEvenOneExists)
|
||||
isEvenOneExists = true;
|
||||
if (!isEvenOneExists)
|
||||
isEvenOneExists = true;
|
||||
}
|
||||
|
||||
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
|
||||
|
@ -469,7 +469,7 @@ void SMESHGUI_ShapeByMeshOp::activateSelection()
|
||||
//purpose : SLOT. Called when element type changed.
|
||||
//=======================================================================
|
||||
|
||||
void SMESHGUI_ShapeByMeshOp::onTypeChanged (int theType)
|
||||
void SMESHGUI_ShapeByMeshOp::onTypeChanged (int /*theType*/)
|
||||
{
|
||||
setElementID("");
|
||||
activateSelection();
|
||||
|
@ -172,7 +172,7 @@ QWidget* SMESHGUI_SingleEditDlg::createButtonFrame (QWidget* theParent)
|
||||
// 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);
|
||||
@ -333,7 +333,7 @@ static bool findTriangles (const SMDS_MeshNode * theNode1,
|
||||
//function : onTextChange()
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHGUI_SingleEditDlg::onTextChange (const QString& theNewText)
|
||||
void SMESHGUI_SingleEditDlg::onTextChange (const QString& /*theNewText*/)
|
||||
{
|
||||
if (myBusy) return;
|
||||
BusyLocker lock(myBusy);
|
||||
|
@ -793,6 +793,7 @@ namespace SMESH
|
||||
}
|
||||
aStudy->setVisibilityStateForAll(Qtx::HiddenState);
|
||||
}
|
||||
// fall through
|
||||
default: {
|
||||
if (SMESH_Actor *anActor = FindActorByEntry(theWnd,theEntry)) {
|
||||
switch (theAction) {
|
||||
@ -1325,7 +1326,7 @@ namespace SMESH
|
||||
|
||||
int GetSelected(LightApp_SelectionMgr* theMgr,
|
||||
TColStd_IndexedMapOfInteger& theMap,
|
||||
const bool theIsElement)
|
||||
const bool /*theIsElement*/)
|
||||
{
|
||||
theMap.Clear();
|
||||
SALOME_ListIO selected; theMgr->selectedObjects( selected );
|
||||
|
@ -946,7 +946,7 @@ void SMESH_MeshAlgos::FindFreeBorders(SMDS_Mesh& theMesh,
|
||||
++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 )
|
||||
@ -954,6 +954,7 @@ void SMESH_MeshAlgos::FindFreeBorders(SMDS_Mesh& theMesh,
|
||||
bordNodes[ cnt ] = be->myBNode1->Node();
|
||||
beLast = be;
|
||||
}
|
||||
bordNodes.back() = beLast->myBNode2->Node();
|
||||
if ( beLast )
|
||||
bordNodes.back() = beLast->myBNode2->Node();
|
||||
}
|
||||
}
|
||||
|
@ -546,7 +546,8 @@ struct SMESH_ElementSearcherImpl: public SMESH_ElementSearcher
|
||||
{
|
||||
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,
|
||||
@ -1673,7 +1674,7 @@ double SMESH_MeshAlgos::GetDistance( const SMDS_MeshFace* face,
|
||||
try {
|
||||
tgtCS = gp_Ax3( xyz[0], OZ, OX );
|
||||
}
|
||||
catch ( Standard_Failure ) {
|
||||
catch ( Standard_Failure& ) {
|
||||
return badDistance;
|
||||
}
|
||||
trsf.SetTransformation( tgtCS );
|
||||
|
@ -116,7 +116,7 @@ Bnd_B3d* SMESH_OctreeNode::buildRootBox()
|
||||
*/
|
||||
//====================================================================================
|
||||
|
||||
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) );
|
||||
|
@ -63,7 +63,7 @@ class SMESHUtils_EXPORT SMESH_OctreeNode : public SMESH_Octree
|
||||
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,
|
||||
|
@ -2358,7 +2358,7 @@ namespace
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
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 )
|
||||
@ -2756,7 +2756,7 @@ namespace
|
||||
// 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 )
|
||||
{
|
||||
@ -2779,10 +2779,12 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -421,7 +421,7 @@ namespace
|
||||
if ( face2 )
|
||||
polySeg.myFace[ iP ] = face2;
|
||||
else
|
||||
;// ??
|
||||
{} // todo: ??
|
||||
for ( int i = 0; i < 3; ++i )
|
||||
{
|
||||
nodes[ i ] = polySeg.myFace[ iP ]->GetNode( i );
|
||||
|
@ -380,7 +380,7 @@ bool Triangulate::triangulate( std::vector< const SMDS_MeshNode*>& nodes,
|
||||
try {
|
||||
axes = gp_Ax2( p0, normal, v01 );
|
||||
}
|
||||
catch ( Standard_Failure ) {
|
||||
catch ( Standard_Failure& ) {
|
||||
return false;
|
||||
}
|
||||
double factor = 1.0, modulus = normal.Modulus();
|
||||
|
@ -30,6 +30,7 @@ void SMESH::throwSalomeEx(const char* txt)
|
||||
|
||||
void SMESH::doNothing(const char* txt)
|
||||
{
|
||||
(void)txt; // unused in release mode
|
||||
MESSAGE( txt << " " << __FILE__ << ": " << __LINE__ );
|
||||
}
|
||||
|
||||
|
@ -930,8 +930,8 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
|
||||
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")
|
||||
@ -951,7 +951,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -843,7 +843,7 @@ void BelongToMeshGroup_i::SetGroupID( const char* theID ) // IOR or StoreName
|
||||
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 );
|
||||
|
@ -295,7 +295,7 @@ GEOM::GEOM_Gen_var SMESH_Gen_i::GetGeomEngine( bool isShaper )
|
||||
|
||||
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;
|
||||
@ -550,7 +550,7 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
|
||||
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();
|
||||
}
|
||||
@ -580,7 +580,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::createMesh()
|
||||
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) {
|
||||
@ -2094,7 +2094,7 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
|
||||
return ok;
|
||||
}
|
||||
}
|
||||
catch ( std::bad_alloc ) {
|
||||
catch ( std::bad_alloc& ) {
|
||||
INFOS( "Compute(): lack of memory" );
|
||||
}
|
||||
catch ( SALOME_Exception& S_ex ) {
|
||||
@ -2304,7 +2304,7 @@ SMESH::MeshPreviewStruct* SMESH_Gen_i::Precompute( SMESH::SMESH_Mesh_ptr theMesh
|
||||
}
|
||||
}
|
||||
}
|
||||
catch ( std::bad_alloc ) {
|
||||
catch ( std::bad_alloc& ) {
|
||||
INFOS( "Precompute(): lack of memory" );
|
||||
}
|
||||
catch ( SALOME_Exception& S_ex ) {
|
||||
@ -2388,7 +2388,7 @@ SMESH::long_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
|
||||
return nbels._retn();
|
||||
}
|
||||
}
|
||||
catch ( std::bad_alloc ) {
|
||||
catch ( std::bad_alloc& ) {
|
||||
INFOS( "Evaluate(): lack of memory" );
|
||||
}
|
||||
catch ( SALOME_Exception& S_ex ) {
|
||||
@ -6278,7 +6278,7 @@ CORBA::Boolean SMESH_Gen_i::IsApplicable ( const char* theAlgoType,
|
||||
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)
|
||||
|
@ -484,7 +484,7 @@ static void addReference (SALOMEDS::SObject_ptr theSObject,
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -98,7 +98,8 @@ SMESH_GroupOnFilter_i::SMESH_GroupOnFilter_i( PortableServer::POA_ptr thePOA,
|
||||
|
||||
SMESH_GroupBase_i::~SMESH_GroupBase_i()
|
||||
{
|
||||
if ( myPreMeshInfo ) delete myPreMeshInfo; myPreMeshInfo = NULL;
|
||||
if ( myPreMeshInfo ) delete myPreMeshInfo;
|
||||
myPreMeshInfo = NULL;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -193,8 +193,8 @@ namespace MeshEditor_I {
|
||||
//!< 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
|
||||
|
@ -3135,7 +3135,7 @@ SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::createSubMesh( GEOM::GEOM_Object_ptr theS
|
||||
// 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 )
|
||||
@ -5753,7 +5753,7 @@ void SMESH_Mesh_i::CreateGroupServants()
|
||||
// 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 );
|
||||
|
@ -284,7 +284,7 @@ void SMESH_NoteBook::ReplaceVariables()
|
||||
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];
|
||||
|
@ -367,7 +367,7 @@ namespace SMESH
|
||||
|
||||
TPythonDump&
|
||||
TPythonDump::
|
||||
operator<<(SMESH::FilterManager_i* theArg)
|
||||
operator<<(SMESH::FilterManager_i* /*theArg*/)
|
||||
{
|
||||
myStream<<"aFilterManager";
|
||||
return *this;
|
||||
@ -448,13 +448,13 @@ namespace SMESH
|
||||
|
||||
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;
|
||||
}
|
||||
@ -671,6 +671,8 @@ namespace SMESH
|
||||
{
|
||||
#ifdef _DEBUG_
|
||||
std::cout << "Exception in SMESH_Gen_i::DumpPython(): " << text << std::endl;
|
||||
#else
|
||||
(void)text; // todo: unused in release mode
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -443,7 +443,7 @@ namespace // internal utils
|
||||
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 )
|
||||
|
@ -2218,6 +2218,8 @@ namespace
|
||||
}
|
||||
#ifdef _DEBUG_
|
||||
_cellID = cellID;
|
||||
#else
|
||||
(void)cellID; // unused in release mode
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -2556,7 +2558,7 @@ namespace
|
||||
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 );
|
||||
@ -3489,7 +3491,7 @@ namespace
|
||||
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 ];
|
||||
@ -3590,7 +3592,7 @@ namespace
|
||||
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;
|
||||
}
|
||||
@ -4744,6 +4746,8 @@ namespace
|
||||
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;
|
||||
}
|
||||
@ -5394,7 +5398,7 @@ namespace
|
||||
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 )
|
||||
@ -5890,7 +5894,7 @@ namespace
|
||||
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 )
|
||||
{
|
||||
|
@ -1246,7 +1246,7 @@ bool _QuadFaceGrid::LoadGrid( SMESH_ProxyMesh& mesh )
|
||||
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 );
|
||||
@ -1662,7 +1662,7 @@ bool _QuadFaceGrid::GetNormal( const TopoDS_Vertex& v, gp_Vec& n ) const
|
||||
n = d1u.Crossed( d1v );
|
||||
return true;
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ bool Function::value( const double, double& f ) const
|
||||
try {
|
||||
OCC_CATCH_SIGNALS;
|
||||
f = pow( 10., f );
|
||||
} catch(Standard_Failure) {
|
||||
} catch(Standard_Failure&) {
|
||||
f = 0.0;
|
||||
ok = false;
|
||||
}
|
||||
@ -185,7 +185,7 @@ FunctionExpr::FunctionExpr( const char* str, const int conv )
|
||||
OCC_CATCH_SIGNALS;
|
||||
myExpr = ExprIntrp_GenExp::Create();
|
||||
myExpr->Process( ( Standard_CString )str );
|
||||
} catch(Standard_Failure) {
|
||||
} catch(Standard_Failure&) {
|
||||
ok = false;
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ bool FunctionExpr::value( const double t, double& f ) const
|
||||
try {
|
||||
OCC_CATCH_SIGNALS;
|
||||
f = myExpr->Expression()->Evaluate( myVars, myValues );
|
||||
} catch(Standard_Failure) {
|
||||
} catch(Standard_Failure&) {
|
||||
f = 0.0;
|
||||
ok = false;
|
||||
}
|
||||
@ -235,7 +235,7 @@ double FunctionExpr::integral( const double a, const double b ) const
|
||||
( *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" );
|
||||
}
|
||||
|
@ -1141,6 +1141,8 @@ void StdMeshers_FaceSide::dump(const char* msg) const
|
||||
MESSAGE_ADD ( "\tF: "<<myFirst[i]<< " L: "<< myLast[i] );
|
||||
MESSAGE_END ( "\tnormPar: "<<myNormPar[i]<<endl );
|
||||
}
|
||||
#else
|
||||
(void)msg; // unused in release mode
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ bool StdMeshers_FixedPoints1D::SetParametersByMesh(const SMESH_Mesh* theMesh,
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool StdMeshers_FixedPoints1D::SetParametersByDefaults(const TDefaults& dflts,
|
||||
bool StdMeshers_FixedPoints1D::SetParametersByDefaults(const TDefaults& /*dflts*/,
|
||||
const SMESH_Mesh* /*mesh*/)
|
||||
{
|
||||
_nbsegs.reserve( 1 );
|
||||
|
@ -188,6 +188,7 @@ namespace // INTERNAL STUFF
|
||||
case TopAbs_EDGE:
|
||||
if ( SMESH_Algo::isDegenerated( TopoDS::Edge( sm->GetSubShape() )))
|
||||
continue;
|
||||
// fall through
|
||||
case TopAbs_FACE:
|
||||
_subM.insert( sm );
|
||||
if ( !sm->IsEmpty() )
|
||||
|
@ -226,7 +226,7 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const vector<double>& table)
|
||||
OCC_CATCH_SIGNALS;
|
||||
val = pow( 10.0, val );
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
catch(Standard_Failure&) {
|
||||
throw SALOME_Exception( LOCALIZED( "invalid value"));
|
||||
return;
|
||||
}
|
||||
@ -319,7 +319,7 @@ bool process( const TCollection_AsciiString& str, int convMode,
|
||||
OCC_CATCH_SIGNALS;
|
||||
myExpr = ExprIntrp_GenExp::Create();
|
||||
myExpr->Process( str.ToCString() );
|
||||
} catch(Standard_Failure) {
|
||||
} catch(Standard_Failure&) {
|
||||
parsed_ok = false;
|
||||
}
|
||||
|
||||
|
@ -798,7 +798,7 @@ void StdMeshers_Penta_3D::MakeMeshOnFxy1()
|
||||
while(itf->more()) {
|
||||
const SMDS_MeshElement* pE0 = itf->next();
|
||||
aElementType = pE0->GetType();
|
||||
if (!aElementType==SMDSAbs_Face) {
|
||||
if (aElementType!=SMDSAbs_Face) {
|
||||
continue;
|
||||
}
|
||||
aNbNodes = pE0->NbNodes();
|
||||
|
@ -557,6 +557,8 @@ namespace {
|
||||
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
|
||||
@ -2705,7 +2707,7 @@ bool StdMeshers_Prism_3D::project2dMesh(const TopoDS_Face& theSrcFace,
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
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 };
|
||||
@ -4166,7 +4168,9 @@ void StdMeshers_PrismAsBlock::faceGridToPythonDump(const SMESH_Block::TShapeID f
|
||||
<< n << ", " << n+1 << ", "
|
||||
<< n+nb+2 << ", " << n+nb+1 << "]) " << endl;
|
||||
}
|
||||
|
||||
#else
|
||||
(void)face; // unused in release mode
|
||||
(void)nb; // unused in release mode
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -4786,6 +4790,8 @@ void StdMeshers_PrismAsBlock::TSideFace::dumpNodes(int nbNodes) const
|
||||
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
|
||||
}
|
||||
|
||||
@ -4832,6 +4838,8 @@ void StdMeshers_PrismAsBlock::TVerticalEdgeAdaptor::dumpNodes(int nbNodes) const
|
||||
cout << (*myNodeColumn)[i]->GetID() << " ";
|
||||
if ( nbNodes < (int) myNodeColumn->size() )
|
||||
cout << myNodeColumn->back()->GetID();
|
||||
#else
|
||||
(void)nbNodes; // unused in release mode
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -4890,6 +4898,8 @@ void StdMeshers_PrismAsBlock::THorizontalEdgeAdaptor::dumpNodes(int nbNodes) con
|
||||
side->GetColumns( u , col, col2 );
|
||||
if ( n != col->second[ i ] )
|
||||
cout << col->second[ i ]->GetID();
|
||||
#else
|
||||
(void)nbNodes; // unused in release mode
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ namespace {
|
||||
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) {
|
||||
@ -106,7 +106,7 @@ namespace {
|
||||
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();
|
||||
@ -131,6 +131,8 @@ namespace {
|
||||
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;
|
||||
}
|
||||
|
@ -1562,7 +1562,9 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
|
||||
|
||||
// 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() )
|
||||
|
@ -588,6 +588,7 @@ namespace {
|
||||
clearPropagationChain( subMesh );
|
||||
}
|
||||
// return; -- hyp is modified any way
|
||||
// fall through
|
||||
default:
|
||||
//case SMESH_subMesh::MODIF_HYP: // hyp modif
|
||||
// clear mesh in a chain
|
||||
|
@ -223,7 +223,7 @@ bool StdMeshers_QuadrangleParams::SetParametersByMesh(const SMESH_Mesh* theMesh,
|
||||
* \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;
|
||||
|
@ -439,7 +439,7 @@ namespace
|
||||
{
|
||||
// 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 )
|
||||
{
|
||||
|
@ -540,7 +540,7 @@ void StdMeshers_Regular_1D::SetEventListener(SMESH_subMesh* subMesh)
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void StdMeshers_Regular_1D::SubmeshRestored(SMESH_subMesh* subMesh)
|
||||
void StdMeshers_Regular_1D::SubmeshRestored(SMESH_subMesh* /*subMesh*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -5312,7 +5312,9 @@ bool _ViscousBuilder::smoothAndCheck(_SolidData& data,
|
||||
} // loop on data._edgesOnShape
|
||||
|
||||
if ( !is1stBlocked )
|
||||
{
|
||||
dumpFunctionEnd();
|
||||
}
|
||||
|
||||
if ( closestFace && le )
|
||||
{
|
||||
@ -5525,7 +5527,7 @@ void _ViscousBuilder::makeOffsetSurface( _EdgesOnShape& eos, SMESH_MesherHelper&
|
||||
|
||||
eos._offsetSurf = new ShapeAnalysis_Surface( surf );
|
||||
}
|
||||
catch ( Standard_Failure )
|
||||
catch ( Standard_Failure& )
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -5627,8 +5629,9 @@ void _ViscousBuilder::putOnOffsetSurface( _EdgesOnShape& eos,
|
||||
<< "_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();
|
||||
}
|
||||
@ -7284,7 +7287,7 @@ bool _ViscousBuilder::updateNormals( _SolidData& data,
|
||||
_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:
|
||||
@ -9110,7 +9113,7 @@ gp_XYZ _LayerEdge::smoothAngular()
|
||||
else
|
||||
norm += cross;
|
||||
}
|
||||
catch (Standard_Failure) { // if |cross| == 0.
|
||||
catch (Standard_Failure&) { // if |cross| == 0.
|
||||
}
|
||||
}
|
||||
gp_XYZ vec = newPos - pN;
|
||||
|
@ -112,7 +112,7 @@ public:
|
||||
* \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"; }
|
||||
|
@ -351,7 +351,7 @@ void StdMeshersGUI_DistrPreview::update()
|
||||
try {
|
||||
OCC_CATCH_SIGNALS;
|
||||
replot();
|
||||
} catch(Standard_Failure) {
|
||||
} catch(Standard_Failure&) {
|
||||
}
|
||||
}
|
||||
|
||||
@ -397,7 +397,7 @@ bool StdMeshersGUI_DistrPreview::init( const QString& str )
|
||||
OCC_CATCH_SIGNALS;
|
||||
myExpr = ExprIntrp_GenExp::Create();
|
||||
myExpr->Process( ( Standard_CString ) str.toLatin1().data() );
|
||||
} catch(Standard_Failure) {
|
||||
} catch(Standard_Failure&) {
|
||||
parsed_ok = false;
|
||||
}
|
||||
|
||||
@ -435,7 +435,7 @@ double StdMeshersGUI_DistrPreview::calc( bool& ok )
|
||||
try {
|
||||
OCC_CATCH_SIGNALS;
|
||||
res = myExpr->Expression()->Evaluate( myVars, myValues );
|
||||
} catch(Standard_Failure) {
|
||||
} catch(Standard_Failure&) {
|
||||
ok = false;
|
||||
res = 0.0;
|
||||
}
|
||||
@ -462,7 +462,7 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const
|
||||
//
|
||||
if(v < -7) v = -7.0;
|
||||
v = pow( 10.0, v );
|
||||
} catch(Standard_Failure) {
|
||||
} catch(Standard_Failure&) {
|
||||
v = 0.0;
|
||||
ok = false;
|
||||
}
|
||||
|
@ -355,11 +355,11 @@ void StdMeshersGUI_PropagationHelperWdg::updateList(bool enable)
|
||||
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
|
||||
@ -379,8 +379,8 @@ std::vector< int > * StdMeshersGUI_PropagationHelperWdg::getSelectedChain()
|
||||
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;
|
||||
|
@ -137,7 +137,7 @@ CORBA::Boolean StdMeshers_Deflection1D_i::IsDimSupported( SMESH::Dimension type
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
std::string StdMeshers_Deflection1D_i::getMethodOfParameter(const int paramIndex,
|
||||
std::string StdMeshers_Deflection1D_i::getMethodOfParameter(const int /*paramIndex*/,
|
||||
int /*nbVars*/) const
|
||||
{
|
||||
return "SetDeflection";
|
||||
|
@ -86,7 +86,7 @@ StdMeshers_Hexa_3D_i::~StdMeshers_Hexa_3D_i()
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
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 );
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ StdMeshers_QuadFromMedialAxis_1D2D_i::~StdMeshers_QuadFromMedialAxis_1D2D_i()
|
||||
//================================================================================
|
||||
|
||||
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 );
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ StdMeshers_RadialQuadrangle_1D2D_i::~StdMeshers_RadialQuadrangle_1D2D_i()
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
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 );
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ int MESHCUT::codeGMSH(std::string type)
|
||||
|
||||
std::string MESHCUT::floatEnsight(float x)
|
||||
{
|
||||
char buf[12];
|
||||
char buf[20];
|
||||
string s;
|
||||
if (x < 0.0)
|
||||
sprintf(buf, "%1.5E", x);
|
||||
|
@ -673,6 +673,7 @@ std::vector<std::string> * MeshJobManager_i::_getResourceNames() {
|
||||
LOG("resource["<<i<<"] = "<<aResourceName);
|
||||
resourceDefinition = _resourcesManager->GetResourceDefinition(aResourceName);
|
||||
LOG("protocol["<<i<<"] = "<<resourceDefinition->protocol);
|
||||
(void)resourceDefinition; // unused in release mode
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user