1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0030895: Coding Rules - specify std namespace explicitly for std::cout and streams

"endl" manipulator for Message_Messenger is renamed to "Message_EndLine".

The following entities from std namespace are now used
with std:: explicitly specified (from Standard_Stream.hxx):
std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream,
std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr,
std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision,
std::hex,std::dec.
This commit is contained in:
tiv
2019-08-02 10:32:16 +03:00
committed by bugmaster
parent 3977d18aca
commit 0423218095
972 changed files with 8554 additions and 8550 deletions

View File

@@ -653,7 +653,7 @@ Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckPin (const TopoDS_Face& F,
case 2: myStatusPin = ShapeExtend::EncodeStatus (ShapeExtend_DONE2); break;
default : break;
}
// cout<<(whatstat == 1 ? "Smooth" : "Sharp")<<" Pin on "<<(sens == 1 ? "U" : "V")<<" Row n0 "<<whatrow<<endl;
// std::cout<<(whatstat == 1 ? "Smooth" : "Sharp")<<" Pin on "<<(sens == 1 ? "U" : "V")<<" Row n0 "<<whatrow<<std::endl;
if (stat == 1 )
{
// Standard_Boolean EqualPoles = Standard_False;
@@ -878,11 +878,11 @@ Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckTwisted (const TopoDS_Face&
// }
// catch (Standard_Failure)
// {
// cout << "Couldn't compute angle between derivative vectors" <<endl;
// std::cout << "Couldn't compute angle between derivative vectors" <<std::endl;
// return Standard_False;
// }
// cout << "angle1 " << angle1<< endl;
// cout << "angle2 " << angle2<< endl;
// std::cout << "angle1 " << angle1<< std::endl;
// std::cout << "angle2 " << angle2<< std::endl;
// if (angle1<=0.0001) return Standard_True;
gp_Pnt proj;
if (p1.Distance(p2)<pp1.Distance(pp2))
@@ -927,12 +927,12 @@ Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckTwisted (const TopoDS_Face&
catch (Standard_Failure const&)
{
#ifdef OCCT_DEBUG
cout << "Couldn't compute angle between derivative vectors" <<endl;
std::cout << "Couldn't compute angle between derivative vectors" <<std::endl;
#endif
return Standard_False;
}
// cout << "angle1 " << angle1<< endl;
// cout << "angle2 " << angle2<< endl;
// std::cout << "angle1 " << angle1<< std::endl;
// std::cout << "angle2 " << angle2<< std::endl;
if ((angle1<=0.001 && angle2<=0.01) || ((M_PI-angle2)<= 0.001 && (M_PI-angle2)<= 0.01)) return Standard_True;
else return Standard_False;
}

View File

@@ -79,7 +79,7 @@ static void ProjectOnSegments (const Adaptor3d_Curve& AC, const gp_Pnt& P3D,
if (aHasChanged)
distmin = Sqrt (distmin2);
#ifdef OCCT_DEBUG
cout<<"ShapeAnalysis_Geom:Project, param="<<param<<" -> distmin="<<distmin<<endl;
std::cout<<"ShapeAnalysis_Geom:Project, param="<<param<<" -> distmin="<<distmin<<std::endl;
#endif
uMax = Min (uMax, param+delta);
@@ -259,8 +259,8 @@ Standard_Real ShapeAnalysis_Curve::ProjectAct(const Adaptor3d_Curve& C3D,
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
//:s5
cout << "\nWarning: ShapeAnalysis_Curve::ProjectAct(): Exception in Extrema_ExtPC: ";
anException.Print(cout); cout << endl;
std::cout << "\nWarning: ShapeAnalysis_Curve::ProjectAct(): Exception in Extrema_ExtPC: ";
anException.Print(std::cout); std::cout << std::endl;
#endif
(void)anException;
OK = Standard_False;
@@ -362,7 +362,7 @@ Standard_Real ShapeAnalysis_Curve::ProjectAct(const Adaptor3d_Curve& C3D,
if (aDistNewton < aModMin)
return aDistNewton;
}
// cout <<"newton failed"<<endl;
// std::cout <<"newton failed"<<std::endl;
ProjectOnSegments (C3D,P3D,40,uMin,uMax,distmin,proj,param);
if (distmin <= preci) return distmin;
ProjectOnSegments (C3D,P3D,20,uMin,uMax,distmin,proj,param);
@@ -497,25 +497,25 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
if (theCurve->IsKind(STANDARD_TYPE(Geom_BoundedCurve)) && !theCurve->IsClosed()) {
if (First < cf) {
#ifdef OCCT_DEBUG
cout << "Update Edge First Parameter to Curve First Parameter" << endl;
std::cout << "Update Edge First Parameter to Curve First Parameter" << std::endl;
#endif
First = cf;
}
else if (First > cl) {
#ifdef OCCT_DEBUG
cout << "Update Edge First Parameter to Curve Last Parameter" << endl;
std::cout << "Update Edge First Parameter to Curve Last Parameter" << std::endl;
#endif
First = cl;
}
if (Last < cf) {
#ifdef OCCT_DEBUG
cout << "Update Edge Last Parameter to Curve First Parameter" << endl;
std::cout << "Update Edge Last Parameter to Curve First Parameter" << std::endl;
#endif
Last = cf;
}
else if (Last > cl) {
#ifdef OCCT_DEBUG
cout << "Update Edge Last Parameter to Curve Last Parameter" << endl;
std::cout << "Update Edge Last Parameter to Curve Last Parameter" << std::endl;
#endif
Last = cl;
}
@@ -547,7 +547,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
if ( theCurve->Value(Last).Distance(theCurve->Value(cl)) < preci ) Last = cl;
if ( First > Last ) {
#ifdef OCCT_DEBUG
cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
std::cout << "Warning : parameter range of edge crossing non periodic curve origin" << std::endl;
#endif
Standard_Real tmp = First;
First = Last;
@@ -575,7 +575,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
// on inverse quand meme les parametres !!!!!!
else {
#ifdef OCCT_DEBUG
cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
std::cout << "Warning : parameter range of edge crossing non periodic curve origin" << std::endl;
#endif
Standard_Real tmp = First;
First = Last;
@@ -585,7 +585,7 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
//abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
else if ( First > Last ) {
#ifdef OCCT_DEBUG
cout << "Warning: parameter range is bad; curve reversed" << endl;
std::cout << "Warning: parameter range is bad; curve reversed" << std::endl;
#endif
First = theCurve->ReversedParameter ( First );
Last = theCurve->ReversedParameter ( Last );
@@ -599,15 +599,15 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t
}
else {
#ifdef OCCT_DEBUG
cout << "UpdateParam3d Failed" << endl;
cout << " - Curve Type : " << theCurve->DynamicType() << endl;
cout << " - Param 1 : " << First << endl;
cout << " - Param 2 : " << Last << endl;
std::cout << "UpdateParam3d Failed" << std::endl;
std::cout << " - Curve Type : " << theCurve->DynamicType() << std::endl;
std::cout << " - Param 1 : " << First << std::endl;
std::cout << " - Param 2 : " << Last << std::endl;
#endif
//abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
if ( First > Last ) {
#ifdef OCCT_DEBUG
cout << "Warning: parameter range is bad; curve reversed" << endl;
std::cout << "Warning: parameter range is bad; curve reversed" << std::endl;
#endif
First = theCurve->ReversedParameter ( First );
Last = theCurve->ReversedParameter ( Last );

View File

@@ -508,8 +508,8 @@ static Handle(Geom_Curve) ComputeIso
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
//:s5
cout << "\nWarning: ShapeAnalysis_Surface, ComputeIso(): Exception in UVIso(): ";
anException.Print(cout); cout << endl;
std::cout << "\nWarning: ShapeAnalysis_Surface, ComputeIso(): Exception in UVIso(): ";
anException.Print(std::cout); std::cout << std::endl;
#endif
(void)anException;
iso.Nullify();
@@ -1044,12 +1044,12 @@ Standard_Integer ShapeAnalysis_Surface::SurfaceNewton(const gp_Pnt2d &p2dPrev,
// if ( rs2 > 100 * preci * preci ) { fail = 6; break; }
// OK, return the result
// cout << "Newton: solution found in " << i+1 << " iterations" << endl;
// std::cout << "Newton: solution found in " << i+1 << " iterations" << std::endl;
sol.SetCoord(U, V);
return (nrm2 < 0.01 * ru2 * rv2 ? 2 : 1); //:q6
}
// cout << "Newton: failed after " << i+1 << " iterations (fail " << fail << " )" << endl;
// std::cout << "Newton: failed after " << i+1 << " iterations (fail " << fail << " )" << std::endl;
return Standard_False;
}
@@ -1200,12 +1200,12 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D, const Standard_Real
if (SurfaceNewton(prev, P3D, preci, solution) != 0)
{
#ifdef OCCT_DEBUG
cout << "Newton found point on conic extrusion" << endl;
std::cout << "Newton found point on conic extrusion" << std::endl;
#endif
return solution;
}
#ifdef OCCT_DEBUG
cout << "Newton failed point on conic extrusion" << endl;
std::cout << "Newton failed point on conic extrusion" << std::endl;
#endif
uf = -500;
ul = 500;
@@ -1318,7 +1318,7 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D, const Standard_Real
}
else {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeAnalysis_Surface::ValueOfUV(): Extrema failed, doing Newton" << endl;
std::cout << "Warning: ShapeAnalysis_Surface::ValueOfUV(): Extrema failed, doing Newton" << std::endl;
#endif
// on essai sur les bords
Standard_Real UU = S, VV = T;//, DistMinOnIso;
@@ -1355,8 +1355,8 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D, const Standard_Real
// En attendant, on met une valeur "pas idiote" mais surement fausse ...
//szv#4:S4163:12Mar99 optimized
//:s5
cout << "\nWarning: ShapeAnalysis_Surface::ValueOfUV(): Exception: ";
anException.Print(cout); cout << endl;
std::cout << "\nWarning: ShapeAnalysis_Surface::ValueOfUV(): Exception: ";
anException.Print(std::cout); std::cout << std::endl;
#endif
(void)anException;
S = (Precision::IsInfinite(uf)) ? 0 : (uf + ul) / 2.;
@@ -1403,7 +1403,7 @@ Standard_Real ShapeAnalysis_Surface::UVFromIso(const gp_Pnt& P3d, const Standard
Bnd_Box aPBox;
aPBox.Set(P3d);
//cout<<"Adaptor3d()->Surface().GetType() = "<<Adaptor3d()->Surface().GetType()<<endl;
//std::cout<<"Adaptor3d()->Surface().GetType() = "<<Adaptor3d()->Surface().GetType()<<std::endl;
//modified by rln on 04/12/97 in order to use theese variables later
Standard_Boolean UV = Standard_True;
@@ -1551,8 +1551,8 @@ Standard_Real ShapeAnalysis_Surface::UVFromIso(const gp_Pnt& P3d, const Standard
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
//:s5
cout << "\nWarning: ShapeAnalysis_Curve::UVFromIso(): Exception: ";
anException.Print(cout); cout << endl;
std::cout << "\nWarning: ShapeAnalysis_Curve::UVFromIso(): Exception: ";
anException.Print(std::cout); std::cout << std::endl;
#endif
(void)anException;
theMin = RealLast(); // theMin de depart

View File

@@ -540,7 +540,7 @@ void ShapeAnalysis_WireOrder::SetChains(const Standard_Real gap)
void ShapeAnalysis_WireOrder::SetCouples(const Standard_Real /*gap*/)
{
#ifdef OCCT_DEBUG
cout<<"ShapeAnalysis_WireOrder:SetCouple not yet implemented"<<endl;
std::cout<<"ShapeAnalysis_WireOrder:SetCouple not yet implemented"<<std::endl;
#endif
}