From: rahuel Date: Thu, 9 Feb 2006 16:30:22 +0000 (+0000) Subject: using namespace std ; X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6abe49d6768269d145aeb0defbfd02ec8030b9ac;p=modules%2Fkernel.git using namespace std ; Must follow the includes char ...[ variable ] is not correct Use (as for WNT) : new char[ variable ] --- diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx index b6e861c10..23cd7dd93 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx @@ -23,8 +23,6 @@ #include "SALOMEDSImpl_StudyManager.hxx" -using namespace std; - #include #include #include @@ -52,6 +50,8 @@ using namespace std; #include #include +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;