mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +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:
@@ -1256,16 +1256,16 @@ TCollection_AsciiString TCollection_AsciiString::Token
|
||||
Standard_Integer BeginIndex=0 ;
|
||||
Standard_Integer EndIndex=0 ;
|
||||
|
||||
// cout << "'" << mystring << "'" << endl ;
|
||||
// std::cout << "'" << mystring << "'" << std::endl ;
|
||||
for ( theOne = 0 ; theOne < whichone ; theOne++ ) {
|
||||
BeginIndex = 0 ;
|
||||
EndIndex = 0 ;
|
||||
// cout << "theOne " << theOne << endl ;
|
||||
// std::cout << "theOne " << theOne << std::endl ;
|
||||
if ( StringIndex == mylength )
|
||||
break ;
|
||||
for (; StringIndex < mylength && EndIndex == 0 ; StringIndex++ ) {
|
||||
SeparatorIndex = 0 ;
|
||||
// cout << "StringIndex " << StringIndex << endl ;
|
||||
// std::cout << "StringIndex " << StringIndex << std::endl ;
|
||||
while ( separators [ SeparatorIndex ] ) {
|
||||
if ( mystring [ StringIndex ] == separators [ SeparatorIndex ] ) {
|
||||
break ;
|
||||
@@ -1275,22 +1275,22 @@ TCollection_AsciiString TCollection_AsciiString::Token
|
||||
if ( separators [ SeparatorIndex ] != '\0' ) { // We have a Separator
|
||||
if ( BeginIndex && EndIndex == 0 ) {
|
||||
EndIndex = StringIndex ;
|
||||
// cout << "EndIndex " << EndIndex << " '" << SubString( BeginIndex , EndIndex ).ToCString() << "'" << endl ;
|
||||
// std::cout << "EndIndex " << EndIndex << " '" << SubString( BeginIndex , EndIndex ).ToCString() << "'" << std::endl ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
else if ( BeginIndex == 0 ) { // We have not a Separator
|
||||
BeginIndex = StringIndex + 1 ;
|
||||
// cout << "BeginIndex " << BeginIndex << endl ;
|
||||
// std::cout << "BeginIndex " << BeginIndex << std::endl ;
|
||||
}
|
||||
}
|
||||
// cout << "BeginIndex " << BeginIndex << " EndIndex " << EndIndex << endl ;
|
||||
// std::cout << "BeginIndex " << BeginIndex << " EndIndex " << EndIndex << std::endl ;
|
||||
}
|
||||
if ( BeginIndex == 0 )
|
||||
return TCollection_AsciiString("",0) ;
|
||||
if ( EndIndex == 0 )
|
||||
EndIndex = mylength ;
|
||||
// cout << "'" << SubString( BeginIndex , EndIndex ).ToCString() << "'" << endl ;
|
||||
// std::cout << "'" << SubString( BeginIndex , EndIndex ).ToCString() << "'" << std::endl ;
|
||||
return TCollection_AsciiString( &mystring [ BeginIndex - 1 ] ,
|
||||
EndIndex - BeginIndex + 1 ) ;
|
||||
}
|
||||
|
@@ -141,7 +141,7 @@ void TCollection_BasicMap::Statistics(Standard_OStream& S) const
|
||||
for (i = 0; i<= mySize; i++) {
|
||||
if (sizes[i] > 0) {
|
||||
l += sizes[i] * i;
|
||||
S << setw(5) << sizes[i] <<" buckets of size "<<i<<"\n";
|
||||
S << std::setw(5) << sizes[i] <<" buckets of size "<<i<<"\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -286,7 +286,7 @@ const TCollection_ExtendedString& TCollection_HExtendedString::String() const
|
||||
//---------------------------------------------------------------------
|
||||
void TCollection_HExtendedString::Print(Standard_OStream& S) const
|
||||
{
|
||||
S << "begin class HExtendedString "<<endl;
|
||||
S << "begin class HExtendedString "<<std::endl;
|
||||
myString.Print(S);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user