FreeCAD/0002-fix-compile.patch

279 lines
10 KiB
Diff

diff --git a/src/3rdParty/salomesmesh/inc/Rn.h b/src/3rdParty/salomesmesh/inc/Rn.h
index 6ec871d93..e92d2275a 100644
--- a/src/3rdParty/salomesmesh/inc/Rn.h
+++ b/src/3rdParty/salomesmesh/inc/Rn.h
@@ -180,12 +180,12 @@ class R4: public R3
{
friend std::ostream& operator <<(std::ostream& f, const R4 & P )
{ f << P.x << ' ' << P.y << ' ' << P.z << ' ' << P.omega; return f; }
- friend istream& operator >>(istream& f, R4 & P)
+ friend std::istream& operator >>(std::istream& f, R4 & P)
{ f >> P.x >> P.y >> P.z >> P.omega ; return f; }
friend std::ostream& operator <<(std::ostream& f, const R4 * P )
{ f << P->x << ' ' << P->y << ' ' << P->z << ' ' << P->omega; return f; }
- friend istream& operator >>(istream& f, R4 * P)
+ friend std::istream& operator >>(std::istream& f, R4 * P)
{ f >> P->x >> P->y >> P->z >> P->omega ; return f; }
public:
diff --git a/src/Mod/Drawing/App/DrawingExport.cpp b/src/Mod/Drawing/App/DrawingExport.cpp
index 0c3c23231..550b12c25 100644
--- a/src/Mod/Drawing/App/DrawingExport.cpp
+++ b/src/Mod/Drawing/App/DrawingExport.cpp
@@ -81,6 +81,7 @@
#include <Base/Vector3D.h>
using namespace Drawing;
+using namespace std;
TopoDS_Edge DrawingOutput::asCircle(const BRepAdaptor_Curve& c) const
{
diff --git a/src/Mod/Part/App/Geometry.cpp b/src/Mod/Part/App/Geometry.cpp
index c206bfb63..8403ff29f 100644
--- a/src/Mod/Part/App/Geometry.cpp
+++ b/src/Mod/Part/App/Geometry.cpp
@@ -203,7 +203,7 @@ unsigned int Geometry::getMemSize (void) const
void Geometry::Save(Base::Writer &writer) const
{
const char c = Construction?'1':'0';
- writer.Stream() << writer.ind() << "<Construction value=\"" << c << "\"/>" << endl;
+ writer.Stream() << writer.ind() << "<Construction value=\"" << c << "\"/>" << std::endl;
}
void Geometry::Restore(Base::XMLReader &reader)
@@ -323,7 +323,7 @@ void GeomPoint::Save(Base::Writer &writer) const
<< "X=\"" << Point.x <<
"\" Y=\"" << Point.y <<
"\" Z=\"" << Point.z <<
- "\"/>" << endl;
+ "\"/>" << std::endl;
}
void GeomPoint::Restore(Base::XMLReader &reader)
@@ -793,7 +793,7 @@ void GeomBezierCurve::Save(Base::Writer& writer) const
<< writer.ind()
<< "<BezierCurve "
<< "PolesCount=\"" << poles.size() <<
- "\">" << endl;
+ "\">" << std::endl;
writer.incInd();
@@ -808,11 +808,11 @@ void GeomBezierCurve::Save(Base::Writer& writer) const
"\" Y=\"" << (*itp).y <<
"\" Z=\"" << (*itp).z <<
"\" Weight=\"" << (*itw) <<
- "\"/>" << endl;
+ "\"/>" << std::endl;
}
writer.decInd();
- writer.Stream() << writer.ind() << "</BezierCurve>" << endl ;
+ writer.Stream() << writer.ind() << "</BezierCurve>" << std::endl ;
}
void GeomBezierCurve::Restore(Base::XMLReader& reader)
@@ -1270,7 +1270,7 @@ void GeomBSplineCurve::Save(Base::Writer& writer) const
"\" KnotsCount=\"" << knots.size() <<
"\" Degree=\"" << degree <<
"\" IsPeriodic=\"" << (int) isperiodic <<
- "\">" << endl;
+ "\">" << std::endl;
writer.incInd();
@@ -1285,7 +1285,7 @@ void GeomBSplineCurve::Save(Base::Writer& writer) const
"\" Y=\"" << (*itp).y <<
"\" Z=\"" << (*itp).z <<
"\" Weight=\"" << (*itw) <<
- "\"/>" << endl;
+ "\"/>" << std::endl;
}
std::vector<double>::const_iterator itk;
@@ -1297,11 +1297,11 @@ void GeomBSplineCurve::Save(Base::Writer& writer) const
<< "<Knot "
<< "Value=\"" << (*itk)
<< "\" Mult=\"" << (*itm) <<
- "\"/>" << endl;
+ "\"/>" << std::endl;
}
writer.decInd();
- writer.Stream() << writer.ind() << "</BSplineCurve>" << endl ;
+ writer.Stream() << writer.ind() << "</BSplineCurve>" << std::endl ;
}
void GeomBSplineCurve::Restore(Base::XMLReader& reader)
@@ -1903,7 +1903,7 @@ void GeomCircle::Save(Base::Writer& writer) const
"\" NormalZ=\"" << normal.Z() <<
"\" AngleXU=\"" << AngleXU <<
"\" Radius=\"" << this->myCurve->Radius() <<
- "\"/>" << endl;
+ "\"/>" << std::endl;
}
void GeomCircle::Restore(Base::XMLReader& reader)
@@ -2132,7 +2132,7 @@ void GeomArcOfCircle::Save(Base::Writer &writer) const
"\" Radius=\"" << circle->Radius() <<
"\" StartAngle=\"" << this->myCurve->FirstParameter() <<
"\" EndAngle=\"" << this->myCurve->LastParameter() <<
- "\"/>" << endl;
+ "\"/>" << std::endl;
}
void GeomArcOfCircle::Restore(Base::XMLReader &reader)
@@ -2383,7 +2383,7 @@ void GeomEllipse::Save(Base::Writer& writer) const
<< "MajorRadius=\"" << this->myCurve->MajorRadius() << "\" "
<< "MinorRadius=\"" << this->myCurve->MinorRadius() << "\" "
<< "AngleXU=\"" << AngleXU << "\" "
- << "/>" << endl;
+ << "/>" << std::endl;
}
void GeomEllipse::Restore(Base::XMLReader& reader)
@@ -2653,7 +2653,7 @@ void GeomArcOfEllipse::Save(Base::Writer &writer) const
<< "AngleXU=\"" << AngleXU << "\" "
<< "StartAngle=\"" << this->myCurve->FirstParameter() << "\" "
<< "EndAngle=\"" << this->myCurve->LastParameter() << "\" "
- << "/>" << endl;
+ << "/>" << std::endl;
}
void GeomArcOfEllipse::Restore(Base::XMLReader &reader)
@@ -2826,7 +2826,7 @@ void GeomHyperbola::Save(Base::Writer& writer) const
<< "MajorRadius=\"" << this->myCurve->MajorRadius() << "\" "
<< "MinorRadius=\"" << this->myCurve->MinorRadius() << "\" "
<< "AngleXU=\"" << AngleXU << "\" "
- << "/>" << endl;
+ << "/>" << std::endl;
}
void GeomHyperbola::Restore(Base::XMLReader& reader)
@@ -3083,7 +3083,7 @@ void GeomArcOfHyperbola::Save(Base::Writer &writer) const
<< "AngleXU=\"" << AngleXU << "\" "
<< "StartAngle=\"" << this->myCurve->FirstParameter() << "\" "
<< "EndAngle=\"" << this->myCurve->LastParameter() << "\" "
- << "/>" << endl;
+ << "/>" << std::endl;
}
void GeomArcOfHyperbola::Restore(Base::XMLReader &reader)
@@ -3236,7 +3236,7 @@ void GeomParabola::Save(Base::Writer& writer) const
<< "NormalZ=\"" << normal.Z() << "\" "
<< "Focal=\"" << this->myCurve->Focal() << "\" "
<< "AngleXU=\"" << AngleXU << "\" "
- << "/>" << endl;
+ << "/>" << std::endl;
}
void GeomParabola::Restore(Base::XMLReader& reader)
@@ -3436,7 +3436,7 @@ void GeomArcOfParabola::Save(Base::Writer &writer) const
<< "AngleXU=\"" << AngleXU << "\" "
<< "StartAngle=\"" << this->myCurve->FirstParameter() << "\" "
<< "EndAngle=\"" << this->myCurve->LastParameter() << "\" "
- << "/>" << endl;
+ << "/>" << std::endl;
}
void GeomArcOfParabola::Restore(Base::XMLReader &reader)
@@ -3581,7 +3581,7 @@ void GeomLine::Save(Base::Writer &writer) const
"\" DirX=\"" << Dir.x <<
"\" DirY=\"" << Dir.y <<
"\" DirZ=\"" << Dir.z <<
- "\"/>" << endl;
+ "\"/>" << std::endl;
}
void GeomLine::Restore(Base::XMLReader &reader)
{
@@ -3722,7 +3722,7 @@ void GeomLineSegment::Save (Base::Writer &writer) const
"\" EndX=\"" << End.x <<
"\" EndY=\"" << End.y <<
"\" EndZ=\"" << End.z <<
- "\"/>" << endl;
+ "\"/>" << std::endl;
}
void GeomLineSegment::Restore (Base::XMLReader &reader)
diff --git a/src/Mod/Part/App/Geometry2d.cpp b/src/Mod/Part/App/Geometry2d.cpp
index fb1de909c..979465533 100644
--- a/src/Mod/Part/App/Geometry2d.cpp
+++ b/src/Mod/Part/App/Geometry2d.cpp
@@ -83,6 +83,7 @@
#include <Mod/Part/App/Geom2d/OffsetCurve2dPy.h>
using namespace Part;
+using namespace std;
extern const char* gce_ErrorStatusText(gce_ErrorType et);
diff --git a/src/Mod/Part/App/PropertyTopoShape.cpp b/src/Mod/Part/App/PropertyTopoShape.cpp
index d590a8553..892e568d4 100644
--- a/src/Mod/Part/App/PropertyTopoShape.cpp
+++ b/src/Mod/Part/App/PropertyTopoShape.cpp
@@ -281,11 +281,11 @@ static void BRepTools_Write(const TopoDS_Shape& Sh, Standard_OStream& S) {
static Standard_Boolean BRepTools_Write(const TopoDS_Shape& Sh,
const Standard_CString File)
{
- ofstream os;
+ std::ofstream os;
#if OCC_VERSION_HEX >= 0x060800
- OSD_OpenStream(os, File, ios::out);
+ OSD_OpenStream(os, File, std::ios::out);
#else
- os.open(File, ios::out);
+ os.open(File, std::ios::out);
#endif
if (!os.rdbuf()->is_open()) return Standard_False;
diff --git a/src/Mod/Raytracing/App/AppRaytracingPy.cpp b/src/Mod/Raytracing/App/AppRaytracingPy.cpp
index d48c51c97..1bb2b1b01 100644
--- a/src/Mod/Raytracing/App/AppRaytracingPy.cpp
+++ b/src/Mod/Raytracing/App/AppRaytracingPy.cpp
@@ -40,6 +40,8 @@
#include <Mod/Part/App/TopoShapePy.h>
#include <App/Application.h>
+using namespace std;
+
namespace Raytracing {
class Module : public Py::ExtensionModule<Module>
diff --git a/src/Mod/Raytracing/App/LuxFeature.cpp b/src/Mod/Raytracing/App/LuxFeature.cpp
index 930fe12b7..d1e0a0089 100644
--- a/src/Mod/Raytracing/App/LuxFeature.cpp
+++ b/src/Mod/Raytracing/App/LuxFeature.cpp
@@ -38,6 +38,7 @@
using namespace Raytracing;
+using namespace std;
PROPERTY_SOURCE(Raytracing::LuxFeature, Raytracing::RaySegment)
diff --git a/src/Mod/Raytracing/App/RayFeature.cpp b/src/Mod/Raytracing/App/RayFeature.cpp
index cdd2cb6dc..235a98685 100644
--- a/src/Mod/Raytracing/App/RayFeature.cpp
+++ b/src/Mod/Raytracing/App/RayFeature.cpp
@@ -36,6 +36,7 @@
using namespace Raytracing;
+using namespace std;
PROPERTY_SOURCE(Raytracing::RayFeature, Raytracing::RaySegment)
diff --git a/src/Mod/TechDraw/App/Geometry.cpp b/src/Mod/TechDraw/App/Geometry.cpp
index 123be7979..16e7487ee 100644
--- a/src/Mod/TechDraw/App/Geometry.cpp
+++ b/src/Mod/TechDraw/App/Geometry.cpp
@@ -75,6 +75,7 @@
using namespace TechDrawGeometry;
using namespace TechDraw;
+using namespace std;
// Collection of Geometric Features
Wire::Wire()