Salome HOME
updated copyright message
[modules/kernel.git] / src / HDFPersist / HDFconvert.cc
index a96f12a36d59d24a2bde15b10b41d04f3545437e..fc0395c7dad55d1b2e1c9e7148fdd5e551e86aa8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -68,9 +68,13 @@ int HDFConvert::FromAscii(const std::string& file, const HDFcontainerObject & hd
 #elif defined WIN32
 
 #define SHMEMSIZE 4096
-
+#ifdef UNICODE
+  std::wstring empty = L"";
+#else
+  std::string empty = "";
+#endif
   HANDLE hMapObject = CreateFileMapping( 
-           INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, SHMEMSIZE, "");
+           INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, SHMEMSIZE, empty.c_str() );
   if (hMapObject != NULL) {
   // Get a pointer to the file-mapped shared memory.
   buffer = ( char* ) MapViewOfFile( 
@@ -82,7 +86,7 @@ int HDFConvert::FromAscii(const std::string& file, const HDFcontainerObject & hd
 #else
 
   // Sort de la compilation
-#error Necessite l''utilisation de la primitive mmap
+#error "Necessite l'utilisation de la primitive mmap"
   
 #endif
   
@@ -118,6 +122,5 @@ int HDFConvert::FromAscii(const std::string& file, const HDFcontainerObject & hd
     return -1;
   };
     
-
-  return length;    
-};
+  return (int)length;
+}