Salome HOME
Fix compilation errors on Windows V1_4_0 V1_4_0rc3 V6_5_0a1
authorbarate <barate>
Mon, 21 Nov 2011 14:41:15 +0000 (14:41 +0000)
committerbarate <barate>
Mon, 21 Nov 2011 14:41:15 +0000 (14:41 +0000)
src/Core/Batch_Versatile.hxx
src/Local/Batch_BatchManager_Local.cxx

index 96b4b6016c9dc6ff941709eba32f152894dd96d4..1b628e288f60bddc30066784c7b5676ee6938c3b 100644 (file)
@@ -43,6 +43,7 @@
 #include "Batch_CoupleType.hxx"
 #include "Batch_TypeMismatchException.hxx"
 #include "Batch_ListIsFullException.hxx"
+#include "Batch_RunTimeException.hxx"
 
 namespace Batch {
 
@@ -57,6 +58,10 @@ namespace Batch {
     Versatile(DiscriminatorType discriminator, size_type maxsize, std::string name);
     Versatile(const Versatile & V);
 
+    // Use of default constructor is forbidden but we cannot declare it private because
+    // compilation fails with VC8 on Windows
+    Versatile() { throw RunTimeException("Forbidden constructor"); }
+
     // Destructor
     virtual ~Versatile();
 
@@ -104,8 +109,7 @@ namespace Batch {
 
   private:
 
-    // Forbid the use of default constructor and affectation operator
-    Versatile() {}
+    // Forbid the use of affectation operator
     void operator= (const Versatile & V) {}
 
   };
index c7d3f60d0f857065feee0ac6a341f8d4bd9f45c2..e33cb65dbb22e39e2375e685c5ef76d8b2995f1c 100644 (file)
@@ -549,7 +549,7 @@ namespace Batch {
     while (1) {
 #ifdef WIN32
       DWORD exitCode;
-      BOOL res = GetExitCodeProcess(child, &exitCode);
+      GetExitCodeProcess(child, &exitCode);
       if (exitCode != STILL_ACTIVE) {
         UNDER_LOCK( cout << "Father sees his child is DONE: exit code = " << exitCode << endl );
         break;
@@ -881,7 +881,7 @@ namespace Batch {
       char * buffer = strdup(comstr.c_str());
 
       // launch the new process
-      BOOL res = CreateProcess(NULL, buffer, NULL, NULL, FALSE,
+      bool res = CreateProcess(NULL, buffer, NULL, NULL, FALSE,
                                CREATE_NO_WINDOW, chNewEnv, NULL, &si, &pi);
 
       if (buffer) free(buffer);