From 415657c5ab2f91cf215bee697ae93082cb320a1d Mon Sep 17 00:00:00 2001
From: Peter Soetens
Date: Thu, 5 Aug 2010 11:40:29 +0200
Subject: [PATCH 1/2] win32: turn of optimization in two files that cause crashes otherwise.
---
src/scripting/Parser.cpp | 12 ++++++++++++
src/scripting/StateGraphParser.cpp | 12 ++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/scripting/Parser.cpp b/src/scripting/Parser.cpp
index 9b39437..774f66f 100644
--- a/src/scripting/Parser.cpp
+++ b/src/scripting/Parser.cpp
@@ -45,6 +45,12 @@
using namespace boost;
+#ifdef WIN32
+ #ifdef NDEBUG
+ #pragma optimize( "", off)
+ #endif
+#endif
+
namespace RTT
{
using namespace detail;
@@ -215,3 +221,9 @@ namespace RTT
return std::make_pair( ret, cond_ret );
}
}
+
+#ifdef WIN32
+ #ifdef NDEBUG
+ #pragma optimize( "", on)
+ #endif
+#endif
diff --git a/src/scripting/StateGraphParser.cpp b/src/scripting/StateGraphParser.cpp
index f00250d..37dae00 100644
--- a/src/scripting/StateGraphParser.cpp
+++ b/src/scripting/StateGraphParser.cpp
@@ -56,6 +56,12 @@
#include
#include
+#ifdef WIN32
+ #ifdef NDEBUG
+ #pragma optimize( "", off)
+ #endif
+#endif
+
namespace RTT
{
using namespace boost;
@@ -1001,3 +1007,9 @@ namespace RTT
}
+
+#ifdef WIN32
+ #ifdef NDEBUG
+ #pragma optimize( "", on)
+ #endif
+#endif
--
1.7.1