summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengine.cpp
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2010-02-19 13:24:27 (GMT)
committerKent Hansen <kent.hansen@nokia.com>2010-02-19 13:27:48 (GMT)
commit09dc6df0472957d75f6c99cf81c939cb9a31602c (patch)
tree437c9a3ea9239a44752373463116651dc4efa763 /src/script/api/qscriptengine.cpp
parentce2201566188a7b079c073b6a9aae637455aa530 (diff)
downloadQt-09dc6df0472957d75f6c99cf81c939cb9a31602c.zip
Qt-09dc6df0472957d75f6c99cf81c939cb9a31602c.tar.gz
Qt-09dc6df0472957d75f6c99cf81c939cb9a31602c.tar.bz2
Work around MSVC2008 compiler crash
"e:\pulse\work\91088\src\script\api\qscriptengine.h(360) : fatal error C1001: An internal error has occurred in the compiler. (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x510A0530:0x00000007]', line 243) To work around this problem, try simplifying or changing the program near the locations listed above." Apparently the compiler doesn't like that a few functions are inlined.
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r--src/script/api/qscriptengine.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 739b3fc..33104c9 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -393,6 +393,21 @@ qsreal ToInteger(qsreal n)
return sign * ::floor(::fabs(n));
}
+#ifdef Q_CC_MSVC
+// MSVC2008 crashes if these are inlined.
+
+QString ToString(qsreal value)
+{
+ return JSC::UString::from(value);
+}
+
+qsreal ToNumber(const QString &value)
+{
+ return ((JSC::UString)value).toDouble();
+}
+
+#endif
+
void GlobalClientData::mark(JSC::MarkStack& markStack)
{
engine->mark(markStack);