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

@@ -6084,7 +6084,7 @@ static int VDisplayType(Draw_Interpretor& , Standard_Integer argc, const char**
static Standard_Integer vr(Draw_Interpretor& , Standard_Integer , const char** a)
{
ifstream s(a[1]);
std::ifstream s(a[1]);
BRep_Builder builder;
TopoDS_Shape shape;
BRepTools::Read(shape, s, builder);
@@ -6852,14 +6852,14 @@ static Standard_Boolean IsValid(const TopTools_ListOfShape& theArgs,
Standard_Boolean ToCheck = Standard_True;
if (!checkValid.IsEmpty()) {
#ifdef OCCT_DEBUG
cout <<"DONT_SWITCH_IS_VALID positionnee a :"<<checkValid.ToCString()<<"\n";
std::cout <<"DONT_SWITCH_IS_VALID positionnee a :"<<checkValid.ToCString()<<"\n";
#endif
if ( checkValid=="true" || checkValid=="TRUE" ) {
ToCheck= Standard_False;
}
} else {
#ifdef OCCT_DEBUG
cout <<"DONT_SWITCH_IS_VALID non positionne\n";
std::cout <<"DONT_SWITCH_IS_VALID non positionne\n";
#endif
}
Standard_Boolean IsValid = Standard_True;

View File

@@ -2237,7 +2237,7 @@ static int VCircleBuilder(Draw_Interpretor& /*di*/, Standard_Integer argc, const
// Get isFilled
Standard_Boolean isFilled;
std::cout << "Enter filled status (0 or 1)\n";
cin >> isFilled;
std::cin >> isFilled;
// Construction of the circle
gp_Pnt A = BRep_Tool::Pnt (TopoDS::Vertex (aShapeA));
@@ -2268,13 +2268,13 @@ static int VCircleBuilder(Draw_Interpretor& /*di*/, Standard_Integer argc, const
do
{
std::cout << " Enter the value of the radius:\n";
cin >> theRad;
std::cin >> theRad;
} while (theRad <= 0);
// Get filled status
Standard_Boolean isFilled;
std::cout << "Enter filled status (0 or 1)\n";
cin >> isFilled;
std::cin >> isFilled;
// Recover the normal to the plane. tag
TopoDS_Face myFace = TopoDS::Face(aShapeA);

View File

@@ -2340,7 +2340,7 @@ void ViewerTest::RemoveView (const TCollection_AsciiString& theViewName, const S
{
if (!ViewerTest_myViews.IsBound1(theViewName))
{
cout << "Wrong view name\n";
std::cout << "Wrong view name\n";
return;
}
@@ -2421,7 +2421,7 @@ void ViewerTest::RemoveView (const TCollection_AsciiString& theViewName, const S
ViewerTest_myContexts.UnBind2(aCurrentContext);
}
}
cout << "3D View - " << theViewName << " was deleted.\n";
std::cout << "3D View - " << theViewName << " was deleted.\n";
if (ViewerTest_EventManager::ToExitOnCloseView())
{
Draw_Interprete ("exit");