1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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

@@ -80,7 +80,7 @@ void GeoAlgo_Sol::Build(const TColgp_SequenceOfXYZ& seqOfXYZ)
//Filling plate
Plate_Plate myPlate;
cout<<" * Nunber of points = "<< nbPnt << endl;
std::cout<<" * Nunber of points = "<< nbPnt << std::endl;
for (i=1; i<= nbPnt; i++) {
gp_Pnt ptProj(seqOfXYZ.Value(i).X(), seqOfXYZ.Value(i).Y(), 0. );
gp_Vec aVec( ptProj, seqOfXYZ.Value(i));
@@ -90,7 +90,7 @@ void GeoAlgo_Sol::Build(const TColgp_SequenceOfXYZ& seqOfXYZ)
}
myPlate.SolveTI(2, 1.);// resolution
if (!myPlate.IsDone()) {
cout<<" plate computation has failed"<< endl;
std::cout<<" plate computation has failed"<< std::endl;
myIsDone=Standard_False;
}
@@ -144,11 +144,11 @@ Handle(Geom_BSplineSurface) GeoAlgo_Sol::Read(const Standard_CString aGroundName
Standard_Integer nbPnt=0;
// Read points from the file
filebuf fic;
istream in(&fic);
std::filebuf fic;
std::istream in(&fic);
if (!fic.open(aGroundName,ios::in)){
cout << " impossible to open a file : "<<aGroundName<<endl;
if (!fic.open(aGroundName,std::ios::in)){
std::cout << " impossible to open a file : "<<aGroundName<<std::endl;
myIsDone = Standard_False;
return 0;
}

View File

@@ -1217,7 +1217,7 @@ Standard_Real ang = D1.Angle(D2); \n\
Handle(ISession_Direction) aDirection2 = new ISession_Direction(gp_Pnt(0,0,0),D2,3);
aDoc->GetAISContext()->Display(aDirection2, Standard_False);
cout<<" D1.Angle(D2) : "<<ang<<endl;
std::cout<<" D1.Angle(D2) : "<<ang<<std::endl;
TCollection_AsciiString Message2 (ang);
TCollection_AsciiString Message3 (ang/M_PI/180);

View File

@@ -1081,9 +1081,9 @@ void CGeometryDoc::OnCreateSol()
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
CString filename = dlg.GetPathName();
filebuf fic;
istream in(&fic);
if (!fic.open (filename, ios::in))
std::filebuf fic;
std::istream in(&fic);
if (!fic.open (filename, std::ios::in))
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : Unable to open file", L"CasCade Error", MB_ICONERROR);
TColgp_SequenceOfXYZ seqOfXYZ;
@@ -1162,7 +1162,7 @@ void CGeometryDoc::OnSimplify()
std::filebuf aFileBuf;
std::istream aStream (&aFileBuf);
if (!aFileBuf.open (initfile, ios::in))
if (!aFileBuf.open (initfile, std::ios::in))
{
initfile += L" was not found. The sample can not be shown.";
myCResultDialog.SetText (initfile);