Fixed a few remaining warnings found by GCC, CLang, and VC++ 14 (recent changes)
}
// Calculate new edges.
-
- Handle(Geom_Surface) S1,S2;
- Handle(Geom_Curve) C, newC;
- Standard_Real f,l;
- TopLoc_Location L;
-
for (Standard_Integer ii = 1; ii <= myEMap.Extent(); ii++)
{
Draft_EdgeInfo& Einf = myEMap.ChangeFromIndex(ii);
const TopoDS_Edge& theEdge = TopoDS::Edge(myEMap.FindKey(ii));
+ Handle(Geom_Surface) S1,S2;
+ Handle(Geom_Curve) C, newC;
+ Standard_Real f,l;
+ TopLoc_Location L;
C = BRep_Tool::Curve(theEdge,L,f,l);
C = Handle(Geom_Curve)::DownCast(C->Transformed(L.Transformation()));
Standard_Real param = Parameter(Einf2.Geometry(), pvt, done);
if (done != 0)
{
- S1 = myFMap.FindFromKey(Einf2.FirstFace()).Geometry();
- S2 = myFMap.FindFromKey(Einf2.SecondFace()).Geometry();
+ Handle(Geom_Surface) S1 = myFMap.FindFromKey(Einf2.FirstFace()).Geometry();
+ Handle(Geom_Surface) S2 = myFMap.FindFromKey(Einf2.SecondFace()).Geometry();
Vinf.ChangeParameter(Edg2) = SmartParameter( Einf2, BRep_Tool::Tolerance(Edg2), pvt, done, S1, S2 );
}
else
Standard_Real param = Parameter(Einf1.Geometry(), pvt, done);
if (done != 0)
{
- S1 = myFMap.FindFromKey(Einf1.FirstFace()).Geometry();
- S2 = myFMap.FindFromKey(Einf1.SecondFace()).Geometry();
+ Handle(Geom_Surface) S1 = myFMap.FindFromKey(Einf1.FirstFace()).Geometry();
+ Handle(Geom_Surface) S2 = myFMap.FindFromKey(Einf1.SecondFace()).Geometry();
Vinf.ChangeParameter(Edg1) = SmartParameter( Einf1, BRep_Tool::Tolerance(Edg1), pvt, done, S1, S2 );
}
else
Standard_Real param = Parameter(Einf.Geometry(), pvt, done);
if (done != 0)
{
- S1 = myFMap.FindFromKey(Einf.FirstFace()).Geometry();
- S2 = myFMap.FindFromKey(Einf.SecondFace()).Geometry();
+ Handle(Geom_Surface) S1 = myFMap.FindFromKey(Einf.FirstFace()).Geometry();
+ Handle(Geom_Surface) S2 = myFMap.FindFromKey(Einf.SecondFace()).Geometry();
Vinf.ChangeParameter(Edg) = SmartParameter( Einf, BRep_Tool::Tolerance(Edg), pvt, done, S1, S2 );
}
else
}
}
- //! Apply floor to vector components.
- //! @param theVec - vector to change (by reference!)
- //! @return modified vector
- inline Vec2f& floor (Vec2f& theVec)
- {
- theVec.x() = std::floor (theVec.x());
- theVec.y() = std::floor (theVec.y());
- return theVec;
- }
-
}
// =======================================================================
{
Handle(StepAP242_GeometricItemSpecificUsage) aGISU
= Handle(StepAP242_GeometricItemSpecificUsage)::DownCast(anIterDSWP.Value());
- Handle(StepRepr_RepresentationItem) aRI;
+ Handle(StepRepr_RepresentationItem) anItem;
if(aPGISU->NbIdentifiedItem() > 0) {
- aRI = Handle(StepRepr_RepresentationItem)::DownCast(aPGISU->IdentifiedItemValue(1));
+ anItem = Handle(StepRepr_RepresentationItem)::DownCast(aPGISU->IdentifiedItemValue(1));
}
- if(aRI.IsNull()) continue;
- Standard_Integer index = aTP->MapIndex(aRI);
- TopoDS_Shape aSh;
- if(index >0) {
- Handle(Transfer_Binder) binder = aTP->MapItem(index);
- aSh = TransferBRep::ShapeResult(binder);
- aDatObj->SetDatumTarget(aSh);
+ if(anItem.IsNull()) continue;
+ Standard_Integer anItemIndex = aTP->MapIndex(anItem);
+ if(anItemIndex >0) {
+ Handle(Transfer_Binder) binder = aTP->MapItem(anItemIndex);
+ TopoDS_Shape anItemShape = TransferBRep::ShapeResult(binder);
+ aDatObj->SetDatumTarget(anItemShape);
}
}
}
if(!DimCharR.IsNull()) {
Handle(StepShape_ShapeDimensionRepresentation) SDimR = DimCharR->Representation();
if(!SDimR.IsNull() && SDimR->NbItems()>0) {
- Handle(StepRepr_RepresentationItem) aRI = SDimR->ItemsValue(1);
- Handle(StepRepr_ValueRange) VR = Handle(StepRepr_ValueRange)::DownCast(aRI);
+ Handle(StepRepr_RepresentationItem) anItem = SDimR->ItemsValue(1);
+ Handle(StepRepr_ValueRange) VR = Handle(StepRepr_ValueRange)::DownCast(anItem);
if(!VR.IsNull()) {
aName = VR->Name();
//StepRepr_CompoundItemDefinition CID = VR->ItemElement();
//after all fixes.
//This fix it should be performed for example for case when cutting edge was performed.
Handle(ShapeFix_Edge) sfe = FixEdgeTool();
- TopExp_Explorer anExpF (myResult, TopAbs_FACE);
- for ( ; anExpF.More(); anExpF.Next())
+ for (anExpF.ReInit(); anExpF.More(); anExpF.Next())
{
TopoDS_Face aF = TopoDS::Face(anExpF.Current());
TopExp_Explorer anExpE (aF, TopAbs_EDGE);
#define OCC_CATCH_SIGNALS
// Suppress GCC warning "variable ... might be clobbered by 'longjmp' or 'vfork'"
- #ifdef __GNUC__
+ #if defined(__GNUC__) && ! defined(__INTEL_COMPILER) && ! defined(__clang__)
#pragma GCC diagnostic ignored "-Wclobbered"
#endif
}
// Suppress GCC warning "variable ... might be clobbered by 'longjmp' or 'vfork'"
- #ifdef __GNUC__
+ #if defined(__GNUC__) && ! defined(__INTEL_COMPILER) && ! defined(__clang__)
#pragma GCC diagnostic ignored "-Wclobbered"
#endif
#ifndef OCCT_DEBUG
void TopOpeBRep_FFDumper::Init(const TopOpeBRep_PFacesFiller& )
{
+ // just shut up compiler warnings
+ (void)myEn1;
+ (void)myEn2;
+ (void)myLineIndex;
+}
#else
void TopOpeBRep_FFDumper::Init(const TopOpeBRep_PFacesFiller& PFF)
{
for (x.Init(myF2,TopAbs_EDGE);x.More();x.Next()) myEM2.Bind(x.Current(),++myEn2);
myLineIndex = 0;
}
-#endif
}
+#endif
//=======================================================================
//function : DumpLine
st = BEFORE;
for (Standard_Integer nite = 1; nite <= 2; nite++) {
if (nite == 2) st = AFTER;
- Standard_Real pn; Standard_Boolean mkp = FUN_getnearpar(e,par,f,l,factor,st,pn);
+ Standard_Real pn = 0.;
+ Standard_Boolean mkp = FUN_getnearpar(e,par,f,l,factor,st,pn);
if (!mkp) continue;
- gp_Vec tmp; Standard_Boolean ok = TopOpeBRepTool_TOOL::TggeomE(pn,e,tmp);
+ gp_Vec tmp;
+ Standard_Boolean ok = TopOpeBRepTool_TOOL::TggeomE(pn,e,tmp);
if (!ok) continue;
tg = gp_Dir(tmp);
return Standard_True;
const Standard_Real factor, const Standard_Integer st, const TopoDS_Face& f,
TopAbs_State& sta)
{
- Standard_Real par;Standard_Boolean ok = FUN_getnearpar(e,pe,pf,pl,factor,st, par);
+ Standard_Real par = 0.;
+ Standard_Boolean ok = FUN_getnearpar(e,pe,pf,pl,factor,st, par);
if (!ok) return Standard_False;
- gp_Pnt pt; ok = FUN_tool_value(par,e, pt);
+ gp_Pnt pt;
+ ok = FUN_tool_value(par,e, pt);
if (!ok) return Standard_False;
gp_Pnt2d uv; ok = TopOpeBRepTool_TOOL::Getstp3dF(pt,f,uv,sta);
return ok;
theCommands.Add("vsetshading",
"vsetshading : vsetshading name Quality(default=0.0008) "
- "\n\t\t: Sets deflection coefficient that defines the quality of the shape\92s representation in the shading mode.",
+ "\n\t\t: Sets deflection coefficient that defines the quality of the shape representation in the shading mode.",
__FILE__,VShading,group);
theCommands.Add("vunsetshading",
"vunsetshading :vunsetshading name "
- "\n\t\t: Sets default deflection coefficient (0.0008) that defines the quality of the shape\92s representation in the shading mode.",
+ "\n\t\t: Sets default deflection coefficient (0.0008) that defines the quality of the shape representation in the shading mode.",
__FILE__,VShading,group);
theCommands.Add ("vtexture",
if (!aModif.IsEmpty())
{
di << ",";
- for (Standard_Integer k = aModif.Lower(); k <= aModif.Upper(); k++)
+ for (Standard_Integer iModif = aModif.Lower(); iModif <= aModif.Upper(); iModif++)
{
- di << " M " << aModif.Value(k);
+ di << " M " << aModif.Value(iModif);
}
}
XCAFDimTolObjects_DatumModifWithValue aM;