summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-12-16 22:33:35 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-12-16 22:33:35 -0300
commitd55f95e0d2a2f99a4130a33ad542c3682d0b92db (patch)
tree5e413e2e81398254ac2e5d7421c5fd893ef537a7 /core
parentbcf27feb980aec593c7cb771984e46113cfad757 (diff)
parent1664cd67101722f0955385ed6b463f534830aeed (diff)
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'core')
-rw-r--r--core/io/http_client.cpp2
-rw-r--r--core/io/ip.cpp2
-rw-r--r--core/io/xml_parser.cpp2
-rw-r--r--core/math/math_funcs.h6
-rw-r--r--core/variant.h6
5 files changed, 15 insertions, 3 deletions
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index 60a200af12..faead675d4 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -29,6 +29,8 @@
#include "http_client.h"
#include "io/stream_peer_ssl.h"
+VARIANT_ENUM_CAST(HTTPClient::Status);
+
Error HTTPClient::connect_url(const String& p_url) {
return OK;
diff --git a/core/io/ip.cpp b/core/io/ip.cpp
index d2a685f6b0..6ef6b31188 100644
--- a/core/io/ip.cpp
+++ b/core/io/ip.cpp
@@ -31,7 +31,7 @@
#include "os/semaphore.h"
#include "hash_map.h"
-
+VARIANT_ENUM_CAST(IP::ResolverStatus);
/************* RESOLVER ******************/
diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp
index 5d3e4f61ad..6306d22368 100644
--- a/core/io/xml_parser.cpp
+++ b/core/io/xml_parser.cpp
@@ -30,6 +30,8 @@
#include "print_string.h"
//#define DEBUG_XML
+VARIANT_ENUM_CAST(XMLParser::NodeType);
+
static bool _equalsn(const CharType* str1, const CharType* str2, int len) {
int i;
for(i=0; str1[i] && str2[i] && i < len; ++i)
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h
index c98a088912..28a8413325 100644
--- a/core/math/math_funcs.h
+++ b/core/math/math_funcs.h
@@ -136,7 +136,10 @@ public:
static int b;
-#if defined(_MSC_VER) && _MSC_VER < 1800
+#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0603 // windows 8?
+ b = (int)((a>0.0f) ? (a + 0.5f):(a -0.5f));
+
+#elif defined(_MSC_VER) && _MSC_VER < 1800
__asm fld a
__asm fistp b
/*#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
@@ -147,6 +150,7 @@ public:
"fistpl %0 \n\t"
: "=m" (b)
: "m" (a));*/
+
#else
b=lrintf(a); //assuming everything but msvc 2012 or earlier has lrint
#endif
diff --git a/core/variant.h b/core/variant.h
index b85c1ea640..a2f4a63e6c 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -167,13 +167,17 @@ public:
static String get_type_name(Variant::Type p_type);
static bool can_convert(Type p_type_from,Type p_type_to);
+#pragma runtime_checks( "", off )
+
template<class T>
static Type get_type_for() {
GetSimpleType<T> t;
Variant v(t.type);
- return v.get_type();
+ Type r = v.get_type();
+ return r;
}
+#pragma runtime_checks( "", restore )
bool is_ref() const;
_FORCE_INLINE_ bool is_num() const { return type==INT || type==REAL; };