Browse Source

Merge branch 'master' into refact-stdren

dmuratshin 8 years ago
parent
commit
8925c4f4c1

+ 4 - 4
examples/Demo/src/TestCamera.h

@@ -80,12 +80,12 @@ public:
             else
             {
                 touch* p1, *p2;
-                for (auto& t : _touches)
+                for (std::map<int, touch>::iterator i = _touches.begin(); i != _touches.end(); ++i)
                 {
-                    if (t.first == te->index)
-                        p1 = &t.second;
+                    if (i->first == te->index)
+                        p1 = &i->second;
                     else
-                        p2 = &t.second;
+                        p2 = &i->second;
                 }
 
                 Vector2 center = (p1->current + p2->current) / 2;

+ 2 - 0
oxygine/src/Actor.cpp

@@ -427,10 +427,12 @@ namespace oxygine
             originalLocalScale = me->__localScale;
             me->localPosition = parent2local(originalLocalPos);
             me->__localScale *= _transform.a;
+#ifdef OX_HAS_CPP11
             if (me->__localScale == NAN)
             {
                 OX_ASSERT(0);
             }
+#endif
         }
 
         event->phase = Event::phase_capturing;

+ 2 - 0
oxygine/src/core/curl/HttpRequestCurlTask.cpp

@@ -131,8 +131,10 @@ namespace oxygine
                     {
                         if (msg->msg == CURLMSG_DONE)
                         {
+#ifdef OX_HAS_CPP11 //msg broken in VS2010
                             curl_multi_remove_handle(multi_handle, msg->easy_handle);
                             core::getMainThreadDispatcher().postCallback(ID_DONE, msg->easy_handle, (void*)msg->data.result, mainThreadFunc, 0);
+#endif
                         }
                     }
                 }

+ 3 - 3
oxygine/src/core/ios/HttpRequestCocoaTask.mm

@@ -53,7 +53,7 @@ static HttpRequestTask *createTask()
     
     NSHTTPURLResponse *resp = (NSHTTPURLResponse*)[downloadTask response];
     
-    int code = [resp statusCode];
+    long code = [resp statusCode];
     
     
     NSFileManager *fileManager = [NSFileManager defaultManager];
@@ -79,7 +79,7 @@ static HttpRequestTask *createTask()
     }
     */
 
-    task->complete_(nil, false, code);
+    task->complete_(nil, false, (int)code);
 }
 
 #pragma mark - NSURLSessionTaskDelegate
@@ -254,7 +254,7 @@ namespace oxygine
                                   
                                   if ([response isKindOfClass:[NSHTTPURLResponse class]]) {
                                       NSHTTPURLResponse *httpResponse = ((NSHTTPURLResponse *)response);
-                                      _responseCode = httpResponse.statusCode;
+                                      _responseCode = (int)httpResponse.statusCode;
                                       //if (statusCode != 200)
                                        //   httpError = true;
                                   }

+ 4 - 4
oxygine/src/dev_tools/TreeInspectorPreview.cpp

@@ -403,11 +403,11 @@ namespace oxygine
                         break;
                     }
                     case cached_batch::uni::uni_vec2:
-                        instance->setUniform(uni.id.c_str(), ((const Vector2*)&uni.data[0]), uni.data.size() / sizeof(Vector2)); break;
+                        instance->setUniform(uni.id.c_str(), ((const Vector2*)&uni.data[0]), int(uni.data.size() / sizeof(Vector2))); break;
                     case cached_batch::uni::uni_vec3:
-                        instance->setUniform(uni.id.c_str(), ((const Vector3*)&uni.data[0]), uni.data.size() / sizeof(Vector3)); break;
+                        instance->setUniform(uni.id.c_str(), ((const Vector3*)&uni.data[0]), int(uni.data.size() / sizeof(Vector3))); break;
                     case cached_batch::uni::uni_vec4:
-                        instance->setUniform(uni.id.c_str(), ((const Vector4*)&uni.data[0]), uni.data.size() / sizeof(Vector4)); break;
+                        instance->setUniform(uni.id.c_str(), ((const Vector4*)&uni.data[0]), int(uni.data.size() / sizeof(Vector4))); break;
                     default:
                         break;
                 }
@@ -464,4 +464,4 @@ namespace oxygine
         }
     }
 
-}
+}