Merge pull request #5045 from Dhilan007/develop_crash

closed #3676: fix compiling error when CC_ENABLE_CHIPMUNK_INTEGRATION and CC_ENABLE_BOX2D_INTEGRATION are zero.
This commit is contained in:
James Chen 2014-01-12 23:36:25 -08:00
commit cc55be4f1a
2 changed files with 6 additions and 1 deletions

View File

@ -19,10 +19,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#if (CC_ENABLE_CHIPMUNK_INTEGRATION || CC_ENABLE_BOX2D_INTEGRATION)
#include "CCPhysicsSprite.h"
#if defined(CC_ENABLE_CHIPMUNK_INTEGRATION) && defined(CC_ENABLE_BOX2D_INTEGRATION)
#if (CC_ENABLE_CHIPMUNK_INTEGRATION && CC_ENABLE_BOX2D_INTEGRATION)
#error "Either Chipmunk or Box2d should be enabled, but not both at the same time"
#endif
@ -406,3 +407,4 @@ const kmMat4& PhysicsSprite::getNodeToParentTransform() const
}
NS_CC_EXT_END
#endif //(CC_ENABLE_CHIPMUNK_INTEGRATION || CC_ENABLE_BOX2D_INTEGRATION)

View File

@ -19,6 +19,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#if (CC_ENABLE_CHIPMUNK_INTEGRATION || CC_ENABLE_BOX2D_INTEGRATION)
#ifndef __PHYSICSNODES_CCPHYSICSSPRITE_H__
#define __PHYSICSNODES_CCPHYSICSSPRITE_H__
@ -132,3 +134,4 @@ protected:
NS_CC_EXT_END
#endif // __PHYSICSNODES_CCPHYSICSSPRITE_H__
#endif //(CC_ENABLE_CHIPMUNK_INTEGRATION || CC_ENABLE_BOX2D_INTEGRATION)