1
0
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:
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

@@ -311,7 +311,7 @@ VrmlData_ErrorStatus VrmlData_Group::Read (VrmlData_InBuffer& theBuffer)
if (OK(aStatus, ReadMultiString (theBuffer, lstURL))) {
NCollection_List<TCollection_AsciiString>::Iterator anIter (lstURL);
for (; anIter.More(); anIter.Next()) {
ifstream aStream;
std::ifstream aStream;
const TCollection_AsciiString& aFileName = anIter.Value();
if (!OK(aStatus, openFile (aStream, aFileName)))
break;
@@ -423,7 +423,7 @@ VrmlData_ErrorStatus VrmlData_Group::openFile
(Standard_IStream& theStream,
const TCollection_AsciiString& theFilename)
{
ifstream& aStream = static_cast<ifstream&> (theStream);
std::ifstream& aStream = static_cast<std::ifstream&> (theStream);
VrmlData_ErrorStatus aStatus (VrmlData_EmptyData);
NCollection_List<TCollection_ExtendedString>::Iterator aDirIter =
Scene().VrmlDirIterator();
@@ -432,7 +432,7 @@ VrmlData_ErrorStatus VrmlData_Group::openFile
continue;
const TCollection_AsciiString aFullName =
TCollection_AsciiString (aDirIter.Value()) + theFilename;
aStream.open (aFullName.ToCString(), ios::in);
aStream.open (aFullName.ToCString(), std::ios::in);
if (aStream.fail())
aStream.clear();
else {
@@ -441,7 +441,7 @@ VrmlData_ErrorStatus VrmlData_Group::openFile
}
}
if (aStatus == VrmlData_EmptyData) {
aStream.open (theFilename.ToCString(), ios::in);
aStream.open (theFilename.ToCString(), std::ios::in);
if (!aStream.fail())
aStatus = VrmlData_StatusOK;
}

View File

@@ -208,11 +208,11 @@ VrmlData_ErrorStatus VrmlData_Scene::readLine (VrmlData_InBuffer& theBuffer)
theBuffer.Input.getline (theBuffer.Line, sizeof(theBuffer.Line));
theBuffer.LineCount++;
const int stat = theBuffer.Input.rdstate();
if (stat & ios::badbit) {
if (stat & std::ios::badbit) {
aStatus = VrmlData_UnrecoverableError;
}
else if (stat & ios::failbit) {
if (stat & ios::eofbit) {
else if (stat & std::ios::failbit) {
if (stat & std::ios::eofbit) {
aStatus = VrmlData_EndOfFile;
}
else {
@@ -981,10 +981,10 @@ VrmlData_ErrorStatus VrmlData_Scene::WriteLine
(* myOutput) << "\n";
}
const int stat = myOutput->rdstate();
if (stat & ios::badbit)
if (stat & std::ios::badbit)
aStatus = VrmlData_UnrecoverableError;
else if (stat & ios::failbit)
// if (stat & ios::eofbit)
else if (stat & std::ios::failbit)
// if (stat & std::ios::eofbit)
// aStatus = VrmlData_EndOfFile;
// else
aStatus = VrmlData_GeneralError;

View File

@@ -335,7 +335,7 @@ class VrmlData_Scene
protected:
/**
* Read whatever line from the input checking the istream flags.
* Read whatever line from the input checking the std::istream flags.
*/
Standard_EXPORT static VrmlData_ErrorStatus
readLine (VrmlData_InBuffer& theBuffer);