mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +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:
@@ -656,7 +656,7 @@ static Standard_Integer XSHAPE_comptoledge
|
||||
if ( ! num1 ) di << "Concerned faces saved to shapes ";
|
||||
Sprintf ( name, "%.10s_%d", prefix, num1+1 );
|
||||
DBRep::Set (name,face);
|
||||
//cout << ( num1 ? ", " : "" ) << name;
|
||||
//std::cout << ( num1 ? ", " : "" ) << name;
|
||||
if (num1 == 0) {
|
||||
di << "" << name;
|
||||
} else {
|
||||
|
@@ -40,7 +40,7 @@ static Standard_Integer sortcompound (Draw_Interpretor& di, Standard_Integer arg
|
||||
for (int i = 0; i < 2; i ++) {
|
||||
Standard_Boolean viaCompound = (i != 0);
|
||||
TopAbs_ShapeEnum ts = sbx.ShapeType(Shape, viaCompound);
|
||||
//cout<<" Type "<<(i ? " (via Compound) : " : "(True) : ");
|
||||
//std::cout<<" Type "<<(i ? " (via Compound) : " : "(True) : ");
|
||||
if (!viaCompound) {
|
||||
di<<" Type (True) : ";
|
||||
} else {
|
||||
|
@@ -214,7 +214,7 @@ static Standard_Integer stwire (Draw_Interpretor& di, Standard_Integer argc, con
|
||||
Standard_Integer nb = sfw->NbEdges();
|
||||
for (i = 1; i <= nb; i ++) {
|
||||
Standard_Boolean stat = sfw->FixSmall (i, Standard_True, 0.0);
|
||||
//cout<<"FixSmall for"<<i<<(stat ? " done" : " not done"); //:sw <<" StatusFix="<<STW.StatusFix()<<"\n";
|
||||
//std::cout<<"FixSmall for"<<i<<(stat ? " done" : " not done"); //:sw <<" StatusFix="<<STW.StatusFix()<<"\n";
|
||||
di<<"FixSmall for"<<i;
|
||||
if (!stat) {
|
||||
di<<" not done";
|
||||
@@ -355,7 +355,7 @@ static Standard_Integer reface (Draw_Interpretor& di, Standard_Integer argc, con
|
||||
char opt = argv[i][0];
|
||||
if (opt == '+') opt = argv[i][1];
|
||||
if (opt == '-') { opt = argv[i][1]; valopt = Standard_False; }
|
||||
//cout<<(valopt ? ".." : ".. NO");
|
||||
//std::cout<<(valopt ? ".." : ".. NO");
|
||||
if (!valopt) {
|
||||
di<<".. NO";
|
||||
} else {
|
||||
@@ -515,11 +515,11 @@ static Standard_Integer fixshape (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
}
|
||||
}
|
||||
|
||||
aSStream << " Fix" << setw (58) << "Count\n";
|
||||
aSStream << " Fix" << std::setw (58) << "Count\n";
|
||||
aSStream << " ------------------------------------------------------------\n";
|
||||
for ( TColStd_DataMapIteratorOfDataMapOfAsciiStringInteger anIter ( aMapOfNumberOfFixes ); anIter.More(); anIter.Next() )
|
||||
{
|
||||
aSStream << " " << anIter.Key() << setw ( 60 - anIter.Key().Length() ) << anIter.Value() << "\n";
|
||||
aSStream << " " << anIter.Key() << std::setw ( 60 - anIter.Key().Length() ) << anIter.Value() << "\n";
|
||||
}
|
||||
aSStream << " ------------------------------------------------------------\n";
|
||||
di << aSStream;
|
||||
|
@@ -1029,7 +1029,7 @@ static Standard_Integer splitface
|
||||
if ( uval.Length() >0 ) {
|
||||
di << "Splitting by U: ";
|
||||
for ( Standard_Integer j=1; j <= uval.Length(); j++ ) {
|
||||
//cout << ( i >j ? ", " : "" ) << uval(j);
|
||||
//std::cout << ( i >j ? ", " : "" ) << uval(j);
|
||||
if (i >j) {
|
||||
di << ", ";
|
||||
} else {
|
||||
@@ -1042,7 +1042,7 @@ static Standard_Integer splitface
|
||||
if ( vval.Length() >0 ) {
|
||||
di << "Splitting by V: ";
|
||||
for ( Standard_Integer j=1; j <= vval.Length(); j++ ) {
|
||||
//cout << ( j >1 ? ", " : "" ) << vval(j);
|
||||
//std::cout << ( j >1 ? ", " : "" ) << vval(j);
|
||||
if (j >1) {
|
||||
di << ", ";
|
||||
} else {
|
||||
@@ -1401,14 +1401,14 @@ static Standard_Integer reshape(Draw_Interpretor& /*theDI*/,
|
||||
{
|
||||
if ( theArgc < 4 )
|
||||
{
|
||||
cout << "Error: wrong number of arguments. Type 'help " << theArgv[0] << "'\n";
|
||||
std::cout << "Error: wrong number of arguments. Type 'help " << theArgv[0] << "'\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
TopoDS_Shape aSource = DBRep::Get(theArgv[2]);
|
||||
if ( aSource.IsNull() )
|
||||
{
|
||||
cout << "Error: source shape ('" << theArgv[2] << "') is null\n";
|
||||
std::cout << "Error: source shape ('" << theArgv[2] << "') is null\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1425,21 +1425,21 @@ static Standard_Integer reshape(Draw_Interpretor& /*theDI*/,
|
||||
{
|
||||
if ( theArgc - i < 3 )
|
||||
{
|
||||
cout << "Error: not enough arguments for replacement\n";
|
||||
std::cout << "Error: not enough arguments for replacement\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
TopoDS_Shape aWhat = DBRep::Get(theArgv[++i]);
|
||||
if ( aWhat.IsNull() )
|
||||
{
|
||||
cout << "Error: argument shape ('" << theArgv[i] << "') is null\n";
|
||||
std::cout << "Error: argument shape ('" << theArgv[i] << "') is null\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
TopoDS_Shape aWith = DBRep::Get(theArgv[++i]);
|
||||
if ( aWith.IsNull() )
|
||||
{
|
||||
cout << "Error: replacement shape ('" << theArgv[i] << "') is null\n";
|
||||
std::cout << "Error: replacement shape ('" << theArgv[i] << "') is null\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1449,14 +1449,14 @@ static Standard_Integer reshape(Draw_Interpretor& /*theDI*/,
|
||||
{
|
||||
if ( theArgc - i < 2 )
|
||||
{
|
||||
cout << "Error: not enough arguments for removal\n";
|
||||
std::cout << "Error: not enough arguments for removal\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
TopoDS_Shape aWhat = DBRep::Get(theArgv[++i]);
|
||||
if ( aWhat.IsNull() )
|
||||
{
|
||||
cout << "Error: shape to remove ('" << theArgv[i] << "') is null\n";
|
||||
std::cout << "Error: shape to remove ('" << theArgv[i] << "') is null\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1464,7 +1464,7 @@ static Standard_Integer reshape(Draw_Interpretor& /*theDI*/,
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Error: invalid syntax at " << anOpt << "\n" ;
|
||||
std::cout << "Error: invalid syntax at " << anOpt << "\n" ;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1473,7 +1473,7 @@ static Standard_Integer reshape(Draw_Interpretor& /*theDI*/,
|
||||
TopoDS_Shape aResult = aReShaper->Apply(aSource);
|
||||
if ( aResult.IsNull() )
|
||||
{
|
||||
cout << "Error: result shape is null\n";
|
||||
std::cout << "Error: result shape is null\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user