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:
@@ -442,7 +442,7 @@ static Standard_Integer intersect_ana(Draw_Interpretor& di, Standard_Integer n,
|
||||
{
|
||||
if (n < 2)
|
||||
{
|
||||
cout << "2dintana circle circle " << endl;
|
||||
std::cout << "2dintana circle circle " << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -483,21 +483,21 @@ static Standard_Integer intconcon(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
{
|
||||
if( n < 2)
|
||||
{
|
||||
cout<< "intconcon con1 con2 "<<endl;
|
||||
std::cout<< "intconcon con1 con2 "<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(Geom2d_Curve) C1 = DrawTrSurf::GetCurve2d(a[1]);
|
||||
if (C1.IsNull())
|
||||
{
|
||||
cout << a[1] << " is Null " << endl;
|
||||
std::cout << a[1] << " is Null " << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(Geom2d_Curve) C2 = DrawTrSurf::GetCurve2d(a[2]);
|
||||
if (C2.IsNull())
|
||||
{
|
||||
cout << a[2] << " is Null " << endl;
|
||||
std::cout << a[2] << " is Null " << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ static Standard_Integer intconcon(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
break;
|
||||
}
|
||||
default:
|
||||
cout << a[2] << " is not conic " << endl;
|
||||
std::cout << a[2] << " is not conic " << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -559,7 +559,7 @@ static Standard_Integer intconcon(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
Intersector.Perform(AC1.Parabola(), *pCon);
|
||||
break;
|
||||
default:
|
||||
cout << a[1] << " is not conic " << endl;
|
||||
std::cout << a[1] << " is not conic " << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@@ -209,7 +209,7 @@ static Standard_Integer PointsByPick
|
||||
//=======================================================================
|
||||
static void PointsByFile(Handle(AppDef_HArray1OfMultiPointConstraint)& MPC,
|
||||
Handle(AppParCurves_HArray1OfConstraintCouple)& TABofCC,
|
||||
ifstream& iFile,
|
||||
std::ifstream& iFile,
|
||||
Draw_Interpretor& di)
|
||||
{
|
||||
Standard_Integer nbp, i, nbc;
|
||||
@@ -379,7 +379,7 @@ static Standard_Integer smoothing (Draw_Interpretor& di,Standard_Integer n, cons
|
||||
// lecture du fichier.
|
||||
// nbpoints, 2d ou 3d, puis valeurs.
|
||||
const char* nomfic = a[ific];
|
||||
ifstream iFile(nomfic, ios::in);
|
||||
std::ifstream iFile(nomfic, std::ios::in);
|
||||
if (!iFile) {
|
||||
di << a[ific] <<"do not exist !\n";
|
||||
return 1;
|
||||
@@ -423,7 +423,7 @@ static Standard_Integer smoothing (Draw_Interpretor& di,Standard_Integer n, cons
|
||||
Variation.Approximate();
|
||||
|
||||
# ifdef GEOMLITETEST_DEB
|
||||
//Variation.Dump(cout);
|
||||
//Variation.Dump(std::cout);
|
||||
Standard_SStream aSStream;
|
||||
Variation.Dump(aSStream);
|
||||
di << aSStream;
|
||||
@@ -468,7 +468,7 @@ static Standard_Integer smoothing (Draw_Interpretor& di,Standard_Integer n, cons
|
||||
if (Tolerance>0) { Variation.SetWithMinMax(Standard_True);}
|
||||
Variation.Approximate();
|
||||
# ifdef GEOMLITETEST_DEB
|
||||
//Variation.Dump(cout);
|
||||
//Variation.Dump(std::cout);
|
||||
Standard_SStream aSStream;
|
||||
Variation.Dump(aSStream);
|
||||
di << aSStream;
|
||||
@@ -549,7 +549,7 @@ static Standard_Integer smoothingbybezier (Draw_Interpretor& di,
|
||||
// lecture du fichier.
|
||||
// nbpoints, 2d ou 3d, puis valeurs.
|
||||
const char* nomfic = a[5];
|
||||
ifstream iFile(nomfic, ios::in);
|
||||
std::ifstream iFile(nomfic, std::ios::in);
|
||||
if (!iFile) {
|
||||
di << a[6] <<"do not exist !\n";
|
||||
return 1;
|
||||
|
@@ -1660,7 +1660,7 @@ static Standard_Integer approxcurve(Draw_Interpretor& di, Standard_Integer n, co
|
||||
if (Case == 1) {
|
||||
GeomConvert_ApproxCurve appr(curve, Tol, Continuity, MaxSeg, MaxDeg);
|
||||
if(appr.HasResult()) {
|
||||
//appr.Dump(cout);
|
||||
//appr.Dump(std::cout);
|
||||
Standard_SStream aSStream;
|
||||
appr.Dump(aSStream);
|
||||
di << aSStream;
|
||||
@@ -1672,7 +1672,7 @@ static Standard_Integer approxcurve(Draw_Interpretor& di, Standard_Integer n, co
|
||||
else if (Case == 2) {
|
||||
Geom2dConvert_ApproxCurve appr(curve2d, Tol, Continuity, MaxSeg, MaxDeg);
|
||||
if(appr.HasResult()) {
|
||||
//appr.Dump(cout);
|
||||
//appr.Dump(std::cout);
|
||||
Standard_SStream aSStream;
|
||||
appr.Dump(aSStream);
|
||||
di << aSStream;
|
||||
@@ -1685,7 +1685,7 @@ static Standard_Integer approxcurve(Draw_Interpretor& di, Standard_Integer n, co
|
||||
Handle(Adaptor3d_HCurve) HACur = new GeomAdaptor_HCurve(curve);
|
||||
Approx_CurvilinearParameter appr(HACur, Tol, Continuity, MaxDeg, MaxSeg);
|
||||
if(appr.HasResult()) {
|
||||
//appr.Dump(cout);
|
||||
//appr.Dump(std::cout);
|
||||
Standard_SStream aSStream;
|
||||
appr.Dump(aSStream);
|
||||
di << aSStream;
|
||||
@@ -1698,7 +1698,7 @@ static Standard_Integer approxcurve(Draw_Interpretor& di, Standard_Integer n, co
|
||||
Handle(Adaptor3d_HSurface) HASur = new GeomAdaptor_HSurface(surface);
|
||||
Approx_CurvilinearParameter appr(HACur2d, HASur, Tol, Continuity, MaxDeg, MaxSeg);
|
||||
if(appr.HasResult()) {
|
||||
//appr.Dump(cout);
|
||||
//appr.Dump(std::cout);
|
||||
Standard_SStream aSStream;
|
||||
appr.Dump(aSStream);
|
||||
di << aSStream;
|
||||
@@ -1714,7 +1714,7 @@ static Standard_Integer approxcurve(Draw_Interpretor& di, Standard_Integer n, co
|
||||
Handle(Adaptor3d_HSurface) HASur2 = new GeomAdaptor_HSurface(surface2);
|
||||
Approx_CurvilinearParameter appr(HACur2d, HASur, HACur2d2, HASur2, Tol, Continuity, MaxDeg, MaxSeg);
|
||||
if(appr.HasResult()) {
|
||||
//appr.Dump(cout);
|
||||
//appr.Dump(std::cout);
|
||||
Standard_SStream aSStream;
|
||||
appr.Dump(aSStream);
|
||||
di << aSStream;
|
||||
|
@@ -1381,14 +1381,14 @@ static Standard_Integer compBsplSur (Draw_Interpretor& , Standard_Integer n, con
|
||||
{
|
||||
if (n < 2)
|
||||
{
|
||||
cout<<"Invalid number of parameters"<<endl;
|
||||
std::cout<<"Invalid number of parameters"<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(Geom_BSplineSurface) GBs1 = DrawTrSurf::GetBSplineSurface(a[1]);
|
||||
Handle(Geom_BSplineSurface) GBs2 = DrawTrSurf::GetBSplineSurface(a[2]);
|
||||
if (GBs1.IsNull() || GBs2.IsNull()) {
|
||||
cout<<"Invalid surface"<<endl;
|
||||
std::cout<<"Invalid surface"<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1423,7 +1423,7 @@ static Standard_Integer compBsplSur (Draw_Interpretor& , Standard_Integer n, con
|
||||
{
|
||||
nbErr++;
|
||||
Standard_Real aD = sqrt(aDist);
|
||||
cout<<"Surfaces differ for U,V,Dist: "<<aU<<" "<<aV<<" "<<aD<<endl;
|
||||
std::cout<<"Surfaces differ for U,V,Dist: "<<aU<<" "<<aV<<" "<<aD<<std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user