mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +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:
@@ -154,9 +154,9 @@ void Standard_ErrorHandler::Abort (const Handle(Standard_Failure)& theError)
|
||||
|
||||
//==== Check if can do the "longjmp" =======================================
|
||||
if(anActive == NULL) {
|
||||
cerr << "*** Abort *** an exception was raised, but no catch was found." << endl;
|
||||
std::cerr << "*** Abort *** an exception was raised, but no catch was found." << std::endl;
|
||||
if (!theError.IsNull())
|
||||
cerr << "\t... The exception is:" << theError->GetMessageString() << endl;
|
||||
std::cerr << "\t... The exception is:" << theError->GetMessageString() << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@@ -75,7 +75,7 @@ Standard_PCharacter Standard_GUID_GetValue16(Standard_PCharacter tmpBuffer,
|
||||
my32b = (Standard_ExtCharacter) strtoul(strtmp, (char **)NULL, 16);
|
||||
}
|
||||
else return NULL;
|
||||
// cout << "V16 :" << hex(my32b) << endl;
|
||||
// std::cout << "V16 :" << hex(my32b) << std::endl;
|
||||
return &tmpBuffer[pos+1];
|
||||
}
|
||||
//=======================================================================
|
||||
@@ -90,7 +90,7 @@ Standard_PCharacter Standard_GUID_GetValue8(Standard_PCharacter tmpBuffer,
|
||||
strncpy(strtmp,tmpBuffer,2);
|
||||
strtmp[2] = '\0';
|
||||
my32b = (Standard_Byte) strtoul(strtmp, (char **)NULL, 16);
|
||||
// cout << "V8 :" << hex(my32b) << endl;
|
||||
// std::cout << "V8 :" << hex(my32b) << std::endl;
|
||||
return &tmpBuffer[2];
|
||||
}
|
||||
//=======================================================================
|
||||
|
@@ -255,7 +255,7 @@ Standard_Real ATanh(const Standard_Real Value)
|
||||
{
|
||||
if ( (Value <= -1.) || (Value >= 1.) ){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Illegal agument in ATanh" << endl ;
|
||||
std::cout << "Illegal agument in ATanh" << std::endl ;
|
||||
#endif
|
||||
throw Standard_NumericError("Illegal agument in ATanh");
|
||||
}
|
||||
@@ -273,7 +273,7 @@ Standard_Real ACosh (const Standard_Real Value)
|
||||
{
|
||||
if ( Value < 1. ){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Illegal agument in ACosh" << endl ;
|
||||
std::cout << "Illegal agument in ACosh" << std::endl ;
|
||||
#endif
|
||||
throw Standard_NumericError("Illegal agument in ACosh");
|
||||
}
|
||||
@@ -291,7 +291,7 @@ Standard_Real Cosh (const Standard_Real Value)
|
||||
{
|
||||
if ( Abs(Value) > 0.71047586007394394e+03 ){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Result of Cosh exceeds the maximum value Standard_Real" << endl ;
|
||||
std::cout << "Result of Cosh exceeds the maximum value Standard_Real" << std::endl ;
|
||||
#endif
|
||||
throw Standard_NumericError("Result of Cosh exceeds the maximum value Standard_Real");
|
||||
}
|
||||
@@ -305,7 +305,7 @@ Standard_Real Sinh (const Standard_Real Value)
|
||||
{
|
||||
if ( Abs(Value) > 0.71047586007394394e+03 ){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Result of Sinh exceeds the maximum value Standard_Real" << endl ;
|
||||
std::cout << "Result of Sinh exceeds the maximum value Standard_Real" << std::endl ;
|
||||
#endif
|
||||
throw Standard_NumericError("Result of Sinh exceeds the maximum value Standard_Real");
|
||||
}
|
||||
@@ -318,7 +318,7 @@ Standard_Real Sinh (const Standard_Real Value)
|
||||
Standard_Real Log (const Standard_Real Value)
|
||||
{ if ( Value <= 0. ){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Illegal agument in Log" << endl ;
|
||||
std::cout << "Illegal agument in Log" << std::endl ;
|
||||
#endif
|
||||
throw Standard_NumericError("Illegal agument in Log");
|
||||
}
|
||||
@@ -331,7 +331,7 @@ Standard_Real Sqrt (const Standard_Real Value)
|
||||
{
|
||||
if ( Value < 0. ){
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Illegal agument in Sqrt" << endl ;
|
||||
std::cout << "Illegal agument in Sqrt" << std::endl ;
|
||||
#endif
|
||||
throw Standard_NumericError("Illegal agument in Sqrt");
|
||||
}
|
||||
|
@@ -63,7 +63,7 @@ Standard_Boolean Standard_Type::SubType (const Standard_CString theName) const
|
||||
// ------------------------------------------------------------------
|
||||
void Standard_Type::Print (Standard_OStream& AStream) const
|
||||
{
|
||||
AStream << hex << (Standard_Address)this << " : " << dec << myName ;
|
||||
AStream << std::hex << (Standard_Address)this << " : " << std::dec << myName ;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
@@ -120,7 +120,7 @@ Standard_Type* Standard_Type::Register (const char* theSystemName, const char* t
|
||||
// then add it to registry and return (the reference to the handle stored in the registry)
|
||||
aRegistry.Bind (aType->mySystemName, aType);
|
||||
|
||||
// cout << "Registering " << theSystemName << ": " << aRegistry.Extent() << endl;
|
||||
// std::cout << "Registering " << theSystemName << ": " << aRegistry.Extent() << std::endl;
|
||||
|
||||
return aType;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ Standard_Type::~Standard_Type ()
|
||||
registry_type& aRegistry = GetRegistry();
|
||||
Standard_ASSERT(aRegistry.UnBind (mySystemName), "Standard_Type::~Standard_Type() cannot find itself in registry",);
|
||||
|
||||
// cout << "Unregistering " << mySystemName << ": " << aRegistry.Extent() << endl;
|
||||
// std::cout << "Unregistering " << mySystemName << ": " << aRegistry.Extent() << std::endl;
|
||||
Standard::Free (mySystemName);
|
||||
Standard::Free (myName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user