瀏覽代碼

Fixed a couple compiler warnings

Original code from pull request #151
Mike Lilligreen 11 年之前
父節點
當前提交
0d6ebf611a
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 3 3
      engine/source/2d/scene/Scene_ScriptBinding.h
  2. 1 1
      engine/source/platformiOS/iOSMutex.mm

+ 3 - 3
engine/source/2d/scene/Scene_ScriptBinding.h

@@ -1895,7 +1895,7 @@ ConsoleMethodWithDocs(Scene, getPrismaticJointMotor, ConsoleString, 3, 3, (joint
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
 
-/*! Creates a prismatic joint.
+/*! Creates a pulley joint.
     @param sceneObjectA The first scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.
     @param sceneObjectA The first scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.
     @param sceneObjectB The second scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.
     @param sceneObjectB The second scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.
     @param localAnchorA The local point of the first scene object where the joint connects.
     @param localAnchorA The local point of the first scene object where the joint connects.
@@ -1983,9 +1983,9 @@ ConsoleMethodWithDocs(Scene, createPulleyJoint, ConsoleInt, 9, 16, (sceneObjectA
 
 
     b2Vec2 worldGroundAnchorA;
     b2Vec2 worldGroundAnchorA;
 
 
-    if ( worldGroundAnchorAElementCount == 1 && argc > 5 )
+    if ( worldGroundAnchorAElementCount == 1 && argc > (nextArg+1) )
     {
     {
-        worldGroundAnchorA.Set( dAtof(argv[nextArg]), dAtof(argv[nextArg++]) );
+        worldGroundAnchorA.Set( dAtof(argv[nextArg]), dAtof(argv[nextArg+1]) );
         nextArg += 2;
         nextArg += 2;
     }
     }
     else if ( worldGroundAnchorAElementCount == 2 )
     else if ( worldGroundAnchorAElementCount == 2 )

+ 1 - 1
engine/source/platformiOS/iOSMutex.mm

@@ -62,7 +62,7 @@ Mutex::~Mutex()
  
  
 bool Mutex::lock( bool block)
 bool Mutex::lock( bool block)
 {
 {
-   bool ok;
+   int ok;
 
 
    if(block)
    if(block)
    {
    {