]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix crash of SALOME GUI on start in GCC4.8 and older with C++11 activated option.
authorimn <imn@opencascade.com>
Tue, 3 Nov 2015 13:30:08 +0000 (16:30 +0300)
committerimn <imn@opencascade.com>
Tue, 3 Nov 2015 13:30:08 +0000 (16:30 +0300)
src/Session/Session_ServerCheck.cxx

index 3f0fc2954dc1a247366064272ac532807cf50774..2789e23a8a47cba946b936fe163e35dbd0878289 100644 (file)
@@ -71,6 +71,15 @@ const int __DEFAULT__ATTEMPTS__ = 300;
 */
 const int __DEFAULT__DELAY__ = 50000;
 
+// The exception being thrown out of a destructor,
+// that is not allowed by default in C++11.
+
+#if __cplusplus >= 201103L
+# define TYPE_NOEXCEPT noexcept(false)
+#else
+# define TYPE_NOEXCEPT
+#endif
+
 /*!
   \classSession_ServerCheck::Locker
   \brief Automatic locker/unlocker.
@@ -92,7 +101,7 @@ public:
   /*!
     \brief Destructor. Wakes the calling thread and goes sleeping.
   */
-  ~Locker()
+  ~Locker() TYPE_NOEXCEPT
   {
     myChecker->myWC->wakeAll();
     myChecker->usleep( myChecker->myDelay );