Fix more GCC warnings.
This commit is contained in:
committed by
wmayer
parent
bc525a41e6
commit
7e42975556
@@ -1307,7 +1307,7 @@ int SMDS_VolumeTool::GetOppFaceIndex( int faceIndex ) const
|
||||
case 15:
|
||||
if ( faceIndex == 0 || faceIndex == 1 )
|
||||
ind = 1 - faceIndex;
|
||||
break;
|
||||
break;
|
||||
case 8:
|
||||
case 12:
|
||||
if ( faceIndex <= 1 ) // top or bottom
|
||||
|
||||
@@ -445,8 +445,15 @@ struct SMESH_ElementSearcherImpl: public SMESH_ElementSearcher
|
||||
: _mesh(&mesh),_meshPartIt(elemIt),_ebbTree(0),_nodeSearcher(0),_tolerance(tol),_outerFacesFound(false) {}
|
||||
virtual ~SMESH_ElementSearcherImpl()
|
||||
{
|
||||
if ( _ebbTree ) delete _ebbTree; _ebbTree = 0;
|
||||
if ( _nodeSearcher ) delete _nodeSearcher; _nodeSearcher = 0;
|
||||
if ( _ebbTree )
|
||||
delete _ebbTree;
|
||||
|
||||
_ebbTree = 0;
|
||||
|
||||
if ( _nodeSearcher )
|
||||
delete _nodeSearcher;
|
||||
|
||||
_nodeSearcher = 0;
|
||||
}
|
||||
virtual int FindElementsByPoint(const gp_Pnt& point,
|
||||
SMDSAbs_ElementType type,
|
||||
|
||||
@@ -11634,18 +11634,18 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
vector<int> orderDom = itn->second;
|
||||
vector<vtkIdType> orderedNodes;
|
||||
for (int idom = 0; idom <orderDom.size(); idom++)
|
||||
orderedNodes.push_back( nodeDomains[node][orderDom[idom]] );
|
||||
SMDS_MeshFace* face = this->GetMeshDS()->AddFaceFromVtkIds(orderedNodes);
|
||||
orderedNodes.push_back( nodeDomains[node][orderDom[idom]] );
|
||||
SMDS_MeshFace* face = this->GetMeshDS()->AddFaceFromVtkIds(orderedNodes);
|
||||
|
||||
stringstream grpname;
|
||||
grpname << "m2j_";
|
||||
grpname << 0 << "_" << 0;
|
||||
int idg;
|
||||
string namegrp = grpname.str();
|
||||
if (!mapOfJunctionGroups.count(namegrp))
|
||||
stringstream grpname;
|
||||
grpname << "m2j_";
|
||||
grpname << 0 << "_" << 0;
|
||||
int idg;
|
||||
string namegrp = grpname.str();
|
||||
if (!mapOfJunctionGroups.count(namegrp))
|
||||
mapOfJunctionGroups[namegrp] = this->myMesh->AddGroup(SMDSAbs_Face, namegrp.c_str(), idg);
|
||||
SMESHDS_Group *sgrp = dynamic_cast<SMESHDS_Group*>(mapOfJunctionGroups[namegrp]->GetGroupDS());
|
||||
if (sgrp)
|
||||
SMESHDS_Group *sgrp = dynamic_cast<SMESHDS_Group*>(mapOfJunctionGroups[namegrp]->GetGroupDS());
|
||||
if (sgrp)
|
||||
sgrp->Add(face->GetID());
|
||||
}
|
||||
|
||||
|
||||
@@ -86,8 +86,8 @@ QuarterWidgetP::QuarterWidgetP(QuarterWidget * masterptr, const QGLWidget * shar
|
||||
clearzbuffer(true),
|
||||
clearwindow(true),
|
||||
addactions(true),
|
||||
contextmenu(NULL),
|
||||
device_pixel_ratio(1.0)
|
||||
device_pixel_ratio(1.0),
|
||||
contextmenu(NULL)
|
||||
{
|
||||
this->cachecontext = findCacheContext(masterptr, sharewidget);
|
||||
|
||||
|
||||
@@ -377,7 +377,10 @@ bool EarClippingTriangulator::Triangulate::Process(const std::vector<Base::Vecto
|
||||
m++;
|
||||
|
||||
/* remove v from remaining polygon */
|
||||
for(s=v,t=v+1;t<nv;s++,t++) V[s] = V[t]; nv--;
|
||||
for(s=v,t=v+1;t<nv;s++,t++)
|
||||
V[s] = V[t];
|
||||
|
||||
nv--;
|
||||
|
||||
/* resest error detection counter */
|
||||
count = 2*nv;
|
||||
@@ -536,8 +539,10 @@ struct Vertex2d_EqualTo : public std::binary_function<const Base::Vector3f&, co
|
||||
bool operator()(const Base::Vector3f& p, const Base::Vector3f& q) const
|
||||
{
|
||||
if (fabs(p.x - q.x) < MeshDefinitions::_fMinPointDistanceD1
|
||||
&& fabs(p.y - q.y) < MeshDefinitions::_fMinPointDistanceD1)
|
||||
return true; return false;
|
||||
&& fabs(p.y - q.y) < MeshDefinitions::_fMinPointDistanceD1)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -347,19 +347,19 @@ static void SetFromResult( CCurve& curve, TPolygon& p, bool reverse = true )
|
||||
if(CArea::m_clipper_clean_distance >= Point::tolerance)
|
||||
CleanPolygon(p,CArea::m_clipper_clean_distance);
|
||||
|
||||
for(unsigned int j = 0; j < p.size(); j++)
|
||||
{
|
||||
const IntPoint &pt = p[j];
|
||||
DoubleAreaPoint dp(pt);
|
||||
CVertex vertex(0, Point(dp.X / CArea::m_units, dp.Y / CArea::m_units), Point(0.0, 0.0));
|
||||
if(reverse)curve.m_vertices.push_front(vertex);
|
||||
else curve.m_vertices.push_back(vertex);
|
||||
}
|
||||
// make a copy of the first point at the end
|
||||
if(reverse)curve.m_vertices.push_front(curve.m_vertices.back());
|
||||
else curve.m_vertices.push_back(curve.m_vertices.front());
|
||||
for(unsigned int j = 0; j < p.size(); j++)
|
||||
{
|
||||
const IntPoint &pt = p[j];
|
||||
DoubleAreaPoint dp(pt);
|
||||
CVertex vertex(0, Point(dp.X / CArea::m_units, dp.Y / CArea::m_units), Point(0.0, 0.0));
|
||||
if(reverse)curve.m_vertices.push_front(vertex);
|
||||
else curve.m_vertices.push_back(vertex);
|
||||
}
|
||||
// make a copy of the first point at the end
|
||||
if(reverse)curve.m_vertices.push_front(curve.m_vertices.back());
|
||||
else curve.m_vertices.push_back(curve.m_vertices.front());
|
||||
|
||||
if(CArea::m_fit_arcs)curve.FitArcs();
|
||||
if(CArea::m_fit_arcs)curve.FitArcs();
|
||||
}
|
||||
|
||||
static void SetFromResult( CArea& area, TPolyPolygon& pp, bool reverse = true )
|
||||
|
||||
@@ -189,7 +189,8 @@ void Path_RoundedComposite::GetCurrentSegmentLocation(double s,
|
||||
Path_RoundedComposite::~Path_RoundedComposite() {
|
||||
if (aggregate)
|
||||
delete orient;
|
||||
delete comp;
|
||||
|
||||
delete comp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -97,7 +97,8 @@ void VelocityProfile_Trap::SetProfileDuration(
|
||||
double factor = duration/newduration;
|
||||
if (factor > 1)
|
||||
return; // do not exceed max
|
||||
a2*=factor;
|
||||
|
||||
a2*=factor;
|
||||
a3*=factor*factor;
|
||||
b2*=factor;
|
||||
b3*=factor*factor;
|
||||
|
||||
@@ -106,7 +106,7 @@ void VelocityProfile_TrapHalf::SetProfileDuration(
|
||||
if ( factor > 1 )
|
||||
return;
|
||||
|
||||
double s = sign(endpos-startpos);
|
||||
double s = sign(endpos-startpos);
|
||||
double tmp = 2.0*s*(endpos-startpos)/maxvel;
|
||||
double v = s*maxvel;
|
||||
duration = newduration;
|
||||
|
||||
@@ -3217,15 +3217,15 @@ int SketchObject::ExposeInternalGeometry(int GeoId)
|
||||
this->addConstraints(icon);
|
||||
|
||||
for (std::vector<Part::Geometry *>::iterator it=igeo.begin(); it != igeo.end(); ++it)
|
||||
if (*it)
|
||||
if (*it)
|
||||
delete *it;
|
||||
|
||||
for (std::vector<Constraint *>::iterator it=icon.begin(); it != icon.end(); ++it)
|
||||
if (*it)
|
||||
delete *it;
|
||||
|
||||
icon.clear();
|
||||
igeo.clear();
|
||||
|
||||
for (std::vector<Constraint *>::iterator it=icon.begin(); it != icon.end(); ++it)
|
||||
if (*it)
|
||||
delete *it;
|
||||
|
||||
icon.clear();
|
||||
igeo.clear();
|
||||
|
||||
return incrgeo; //number of added elements
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user