fix warnings in smesh

This commit is contained in:
wmayer 2016-10-08 18:23:04 +02:00
parent 68ea7fdac5
commit b17ae2a922
13 changed files with 20 additions and 14 deletions

View File

@ -41,7 +41,7 @@ class SMDS_EXPORT SMDS_BallElement: public SMDS_MeshCell
bool ChangeNode (const SMDS_MeshNode * node);
virtual bool ChangeNodes(const SMDS_MeshNode* nodes[],
const int nbNodes) { return ChangeNode( nodes[0] ); }
const int /*nbNodes*/) { return ChangeNode( nodes[0] ); }
virtual void Print (std::ostream & OS) const;
virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Ball; }

View File

@ -42,7 +42,7 @@ public:
{
return SMDSEntity_Edge;
}
virtual bool ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
virtual bool ChangeNodes(const SMDS_MeshNode* /*nodes*/[], const int /*nbNodes*/)
{
return false;
}

View File

@ -33,7 +33,7 @@ public:
virtual ~SMDS_MeshCell();
virtual bool ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)= 0;
virtual bool vtkOrder(const SMDS_MeshNode* nodes[], const int nbNodes) {return true; }
virtual bool vtkOrder(const SMDS_MeshNode* /*nodes*/[], const int /*nbNodes*/) {return true; }
static VTKCellType toVtkType (SMDSAbs_EntityType vtkType);
static SMDSAbs_EntityType toSmdsType(VTKCellType vtkType);

View File

@ -62,7 +62,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 NodesAround(const SMDS_MeshNode * node,

View File

@ -134,8 +134,8 @@ DEF_MSG_BUFFER << os.str() << std::endl;
#else /* ifdef _DEBUG_*/
#define INFOS_COMPILATION
#define MESSAGE(msg)
#define SCRUTE(var)
#define MESSAGE(msg) {}
#define SCRUTE(var) {}
#define REPERE
#define BEGIN_OF(msg)
#define END_OF(msg)

View File

@ -1749,7 +1749,7 @@ namespace MED
// write node ids
SetCellInfo(theInfo,theMode,theErr);
if ( theErr && theErr < 0 )
if ( theErr && *theErr < 0 )
return;
// write diameter

View File

@ -1014,12 +1014,14 @@ std::vector< std::string > SMESH_Gen::GetPluginXMLPaths()
}
// get a separator from rootDir
for ( pos = strlen( rootDir )-1; pos >= 0 && sep.empty(); --pos )
for ( pos = strlen( rootDir )-1; pos > 0 && sep.empty(); --pos )
{
if ( rootDir[pos] == '/' || rootDir[pos] == '\\' )
{
sep = rootDir[pos];
break;
}
}
#ifdef WIN32
if (sep.empty() ) sep = "\\";
#else

View File

@ -117,7 +117,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));

View File

@ -1157,7 +1157,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++ ];

View File

@ -1650,7 +1650,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 );

View File

@ -1479,7 +1479,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() )

View File

@ -1582,7 +1582,7 @@ namespace
int nbNodes2 = meshDS->MeshElements(edgeIDs[ edgeIDs2[i]] )->NbNodes();
if ( nbNodes1 != nbNodes2 )
return false;
if (( i-1 >= 0 ) &&
if (( i >= 1 ) &&
( edgeIDs1[i-1] == edgeIDs1[i] ||
edgeIDs2[i-1] == edgeIDs2[i] ))
return false;

View File

@ -1404,7 +1404,7 @@ namespace VISCOUS_3D
#define dumpMoveComm(n,txt)
#define dumpCmd(txt)
#define dumpFunctionEnd()
#define dumpChangeNodes(f)
#define dumpChangeNodes(f) {}
#define debugMsg( txt ) {}
#endif
}
@ -6645,8 +6645,10 @@ bool _ViscousBuilder::shrink()
dumpFunction(SMESH_Comment("beforeShrinkFace")<<f2sd->first); // debug
SMDS_ElemIteratorPtr fIt = smDS->GetElements();
while ( fIt->more() )
{
if ( const SMDS_MeshElement* f = fIt->next() )
dumpChangeNodes( f );
}
dumpFunctionEnd();
// Replace source nodes by target nodes in mesh faces to shrink