0029447: The constructor of Message_PrinterOStream mixes up cout and cerr
authorabv <abv@opencascade.com>
Sun, 28 Jan 2018 16:49:43 +0000 (19:49 +0300)
committerapn <apn@opencascade.com>
Mon, 29 Jan 2018 18:11:51 +0000 (21:11 +0300)
Use of cerr or cout is corrected in Message_PrinterOStream constructor

src/Message/Message_PrinterOStream.cxx
src/TDocStd/TDocStd_Application.cxx

index b822c0f..b3c7e23 100644 (file)
@@ -49,12 +49,12 @@ Message_PrinterOStream::Message_PrinterOStream (const Standard_CString theFileNa
   myIsFile (Standard_False)
 {
   myTraceLevel = theTraceLevel;
-  if (strcasecmp(theFileName, "cout") == 0)
+  if (strcasecmp(theFileName, "cerr") == 0)
   {
     myStream = &std::cerr;
     return;
   }
-  else if (strcasecmp(theFileName, "cerr") == 0)
+  else if (strcasecmp(theFileName, "cout") == 0)
   {
     myStream = &std::cout;
     return;
index 6ef4379..a8f230f 100644 (file)
@@ -19,8 +19,6 @@
 #include <CDF_DirectoryIterator.hxx>
 #include <CDF_Session.hxx>
 #include <CDF_Store.hxx>
-#include <Message_Messenger.hxx>
-#include <Message_PrinterOStream.hxx>
 #include <PCDM_RetrievalDriver.hxx>
 #include <PCDM_StorageDriver.hxx>
 #include <Plugin.hxx>
@@ -30,9 +28,7 @@
 #include <Standard_ErrorHandler.hxx>
 #include <Standard_NoSuchObject.hxx>
 #include <Standard_NotImplemented.hxx>
-#include <Standard_Type.hxx>
 #include <TCollection_ExtendedString.hxx>
-#include <TDF_Label.hxx>
 #include <TDocStd_Application.hxx>
 #include <TDocStd_Document.hxx>
 #include <TDocStd_Owner.hxx>