Salome HOME
updated copyright message
[modules/kernel.git] / src / HDFPersist / HDFconvert.cc
index 60c3ebb0af171e10dfd08fe13ab08e7fba76a972..fc0395c7dad55d1b2e1c9e7148fdd5e551e86aa8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  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
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -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;
+}