]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
using namespace std ;
authorrahuel <rahuel@opencascade.com>
Thu, 9 Feb 2006 16:30:22 +0000 (16:30 +0000)
committerrahuel <rahuel@opencascade.com>
Thu, 9 Feb 2006 16:30:22 +0000 (16:30 +0000)
Must follow the includes

char ...[ variable ] is not correct
Use (as for WNT) : new char[ variable ]

src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx

index b6e861c10f4fcb9e847a30841a30816c409cd901..23cd7dd93b3f8ba48718ed662aff81e6dcb8e800 100644 (file)
@@ -23,8 +23,6 @@
 
 #include "SALOMEDSImpl_StudyManager.hxx"
 
-using namespace std;
-
 #include <CDF_Session.hxx>
 #include <CDF_DirectoryIterator.hxx>
 #include <TDF_Label.hxx>
@@ -52,6 +50,8 @@ using namespace std;
 #include <iostream>
 #include <stdlib.h>
 
+using namespace std;
+
 IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_StudyManager, MMgt_TShared )
 IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_StudyManager, MMgt_TShared )
 
@@ -153,16 +153,16 @@ Handle(SALOMEDSImpl_Study) SALOMEDSImpl_StudyManager::Open(const TCollection_Asc
   }
   catch (HDFexception)
     {
-#ifndef WNT
-      char eStr[strlen(aUrl.ToCString())+17];
-#else
+//#ifndef WNT
+//      char eStr[strlen(aUrl.ToCString())+17];
+//#else
          char *eStr;
          eStr = new char[strlen(aUrl.ToCString())+17];
-#endif
+//#endif
       sprintf(eStr,"Can't open file %s",aUrl.ToCString());
-#ifdef WNT
+//#ifdef WNT
          delete [] eStr;
-#endif
+//#endif
       _errorCode = TCollection_AsciiString(eStr);
       return NULL;
     }
@@ -195,11 +195,11 @@ Handle(SALOMEDSImpl_Study) SALOMEDSImpl_StudyManager::Open(const TCollection_Asc
   }
   catch (HDFexception)
     {
-#ifndef WNT
-      char eStr[strlen(aUrl.ToCString())+17];
-#else
+//#ifndef WNT
+//      char eStr[strlen(aUrl.ToCString())+17];
+//#else
          char *eStr = new char [strlen(aUrl.ToCString())+17];
-#endif
+//#endif
       sprintf(eStr,"Can't open file %s", aUrl.ToCString());
       _errorCode = TCollection_AsciiString(eStr);
       return NULL;